Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ximgproc: GraphSegmentation: support CV_8U/CV_8S/CV_16U/CV_16S/CV_32F/CV_64F input #3546

Open
wants to merge 6 commits into
base: 4.x
Choose a base branch
from

Conversation

Kumataro
Copy link
Contributor

@Kumataro Kumataro commented Aug 6, 2023

Fix #3544

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@Kumataro Kumataro changed the title ximgproc: GraphSegmentation: support CV_16U/CV_32F/CV_64F input WIP: ximgproc: GraphSegmentation: support CV_16U/CV_32F/CV_64F input Aug 7, 2023
@Kumataro Kumataro changed the title WIP: ximgproc: GraphSegmentation: support CV_16U/CV_32F/CV_64F input ximgproc: GraphSegmentation: support CV_8S/CV_16U/CV_16S/CV_32S/CV_32F/CV_64F input Nov 3, 2023
make_tuple<int, double, int>( CV_32SC1, 2147483647. / 255., 14 ),
make_tuple<int, double, int>( CV_32SC2, 2147483647. / 255., 17 ),
make_tuple<int, double, int>( CV_32SC3, 2147483647. / 255., 17 ),
make_tuple<int, double, int>( CV_32SC4, 2147483647. / 255., 17 ),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32S/U and 64S/U are not used to store images.

The same is for bool, BF16.
FP16 is should be omitted too (8U do that better with less memory).


8U/16U/32F - this is the primary list to work with images.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review! I see and remove supporing CV_32SCs (implementation, test and document).

@Kumataro Kumataro changed the title ximgproc: GraphSegmentation: support CV_8S/CV_16U/CV_16S/CV_32S/CV_32F/CV_64F input ximgproc: GraphSegmentation: support CV_8U/CV_8S/CV_16U/CV_16S/CV_32F/CV_64F input Nov 8, 2023
@Kumataro
Copy link
Contributor Author

Kumataro commented Nov 9, 2023

Building has been started yesterday, but there are 2 warnings.

https://pullrequest.opencv.org/buildbot/builders/precommit-contrib_windows64/builds/100489/steps/compile%20release

They will be fixed by opencv/opencv#24512

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.

cv2.ximgproc.segmentation.createGraphSegmentation seems to handle wrongly float32 images (NumPy)
2 participants