Skip to content

Introduce new depth types (by redesigning ElemType register)#12611

Closed
cv3d wants to merge 6 commits intoopencv:masterfrom
cv3d:clean/boiler_code/mat_cn
Closed

Introduce new depth types (by redesigning ElemType register)#12611
cv3d wants to merge 6 commits intoopencv:masterfrom
cv3d:clean/boiler_code/mat_cn

Conversation

@cv3d
Copy link
Copy Markdown
Contributor

@cv3d cv3d commented Sep 22, 2018

WARNING: THIS PR WILL BREAK USER CODE IN CASE THEY:

  • UTILIZE HARD-CODED MULTI-CHANNELS NUMERIC VALUES INSTEAD OF PROPER TYPE VALUES (E.G.: 8 FOR CV_8UC2)
  • UTILIZE HARD-CODED NUMERIC INCREMENTS TO STEP FROM A CHANNEL TO ANOTHER (E.G. CV_32FC2 + 8 for CV_32FC3)

Merge with opencv/opencv_contrib#1790
resolves #12584
related #12569

This pullrequest changes

  • Increase the supported depth types limit from 8 to 32
    • Introduced uint32, uint64, int64, Q formats, and other special formats (i.e. raw, auto, undefined)
  • Increase the supported channels limit from 512 to 2048 (still extensible with further design work)
    • Use the next available (bigger) number of channels in case of invalid channel input
    • Great impact expected on various modules (e.g. DNN and feature2D)
  • Fully-backwards compatible with serialized files generated using older OpenCV versions

Future work:

  • assertion for (cn)==(cn) in CV_MAKETYPE to avoid random input multiple evaluation
  • replace expressions like depth = rng.uniform(CV_8U, CV_16F+1); with:
vector<int> depths {CV_8U, CV_16U, CV_32U, CV_64U, CV_8S, CV_16S, CV_32S, CV_64S, CV_32F, CV_64F};
depth = depths[rng.uniform(0, depths.size())];
  • utilize and test new types
  • internally support both CV_32F and CV_64F with old and new numeric values, while defaulting to the new values
force_builders=Custom,Linux32,Win32,Win64 MSVS2017,ARMv7,ARMv8,Android pack
docker_image:Docs=docs-js
docker_image:Custom=ubuntu-cuda:16.04

@cv3d cv3d closed this Sep 22, 2018
@cv3d cv3d reopened this Sep 22, 2018
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch 2 times, most recently from 3f28eed to 4d2ae62 Compare September 22, 2018 20:13
@cv3d cv3d changed the title Clean CV_MAT_CN related boiler code Redesign ElemType register Sep 22, 2018
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch 22 times, most recently from ab2a09d to 68fb2e9 Compare September 25, 2018 06:16
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch from 20c32af to d217d77 Compare September 25, 2018 09:06
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch 5 times, most recently from df44d55 to 894a0f0 Compare September 27, 2018 12:20
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch 10 times, most recently from b7969f6 to 1f5386e Compare October 1, 2018 07:25
@vpisarev vpisarev self-assigned this Oct 1, 2018
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch 2 times, most recently from efd1d9e to 1e9731f Compare October 2, 2018 11:15
@cv3d cv3d force-pushed the clean/boiler_code/mat_cn branch from 1e9731f to ce424f1 Compare October 2, 2018 11:30
@vpisarev vpisarev mentioned this pull request Oct 2, 2018
@vpisarev
Copy link
Copy Markdown
Contributor

vpisarev commented Oct 2, 2018

@cv3d, your PR contains the following clause: "By merging this, you agree to properly attribute the contributor wherever you mention this feature!"

we are not ready to fulfil this requirement; we do our best to provide proper credits, but we do not promise to do it each time. either please remove it or close this PR.

@alalek, please, make sure that no further PRs containing such or similar requirement are merged.

@vpisarev vpisarev closed this Oct 2, 2018
@cv3d
Copy link
Copy Markdown
Contributor Author

cv3d commented Oct 2, 2018

I already went through all the effort, and since you really closed this, I removed the notice, so please reopen.

However, please check my suggestion for the changelog entries #12310 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redesign of the ElemType register for OpenCV v4

2 participants