Support UnBayer color conversion for Single (float) Images (Feature #2346)


Added by Gilad Kapelushnik over 12 years ago. Updated over 9 years ago.


Status:Open Start date:2012-09-10
Priority:Low Due date:
Assignee:Gilad Kapelushnik % Done:

0%

Category:imgproc, video
Target version:-
Difficulty: Pull request:

Description

As of 2.4.2, Unbayer is only supported for 8bit and 16bit integers.
Please add support for Single (float) based images.


Associated revisions

Revision 9885a671
Added by Andrey Pavlenko about 11 years ago

Merge pull request #2346 from ilya-lavrenov:umat_tests_cleanup

History

Updated by Kirill Kornyakov over 12 years ago

Could you please explain why do you need this functionality? It would be useful to have:
  1. Use case description
  2. Input/output data attached
  3. Code sample which is supposed to work after this feature is added

Unfortunately I personally don't understand why one may need this function, so please elaborate on your problem. And think about implementing it by yourself :)

  • Category set to imgproc, video
  • Assignee set to Gilad Kapelushnik
  • Priority changed from Normal to Low

Updated by Gilad Kapelushnik over 12 years ago

I know that in most cases the first operation that is done is unbayer the data that is received from the camera.
In my case I apply two operations before unbayer.

The first is 'Dark Frame' correction - subtracting a dark frame from the image. Lets assume the data received from the camera is 12bit image coded in 16bit data. Subtracting the dark frame from the received image would produce an int16 image, no problem here.

The second is 'Flat field correction' - This is done to remove some unwanted artifacts caused by the lens (and sensor micro-lenses). Since there is a division operation here the output image is float. It is possible to have the flat filed correction produce int16 images but that is in the cost of chopping off some data and converting the data from float to int16 for the whole image. We can argue how much that 'copped' data affects quality but that is another story.

After these 2 procedures I do unbayer. It is better applying these procedures before unbayer as it is faster and the errors or unwanted artifacts aren't smoothed by the unbayer procedure.

I hope I was able to explain this properly.

If you think I would get better results doing things differently I would be happy to know.

Cheers,

Gilad.

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4425

Also available in: Atom PDF