opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

Extend cudaimgproc::demosaicing for f32

Open apbr opened this issue 1 year ago • 4 comments

Extend cudaimgproc::demosaicing to also allow images with f32 values.

Pull Request Readiness Checklist

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

  • [x] I agree to contribute to the project under Apache 2 License.
  • [x] 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
  • [x] The PR is proposed to the proper branch
  • [x] There is a reference to the original bug report and related work -> not applicable
  • [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name.
  • [x] The feature is well documented and sample code can be built with the project CMake

apbr avatar Nov 28 '24 09:11 apbr

@apbr please see https://github.com/opencv/opencv_contrib/pull/3777

It seems like adding 32f to that PR would be easier than deconflicting with this one and we might get all functionality merged sooner. Can I ask what sensor you are using where you have 32f raw pixels?

llschloesser avatar Apr 02 '25 17:04 llschloesser

@llschloesser #3777 was merged 1 hour after your comment. So I'll just rebase my PR.

Can I ask what sensor you are using where you have 32f raw pixels?

We do some image processing steps before the debayering. Their resulting datatype is f32. So it's not directly from the sensor.

apbr avatar Apr 03 '25 11:04 apbr

If you follow the template pattern of the earlier PR you'll get 32f to gray and 4 channel, there is no need to restrict to 3 channel.

llschloesser avatar Apr 03 '25 14:04 llschloesser

If you follow the template pattern of the earlier PR you'll get 32f to gray and 4 channel, there is no need to restrict to 3 channel.

Good point, I'll rework and test it.

apbr avatar Apr 03 '25 14:04 apbr