Closed GoogleCodeExporter closed 9 years ago
OpenCV doesn't do gamma correction, so if you're expecting the same behavior
from CanvasFrame, that is your images are already gamma corrected, create one
with something like `new CanvasFrame("My Image", 1.0)` as shown in the
README.txt file. Does that do you what you want?
Original comment by samuel.a...@gmail.com
on 19 Jun 2012 at 1:25
Indeed, that do the trick,
thanks for your quick answer !
Actually I took this page¹ to get started with JavaCV, and saw nothing about
gamma (while both sources to load images are said to do the same²). Maybe you
can add some note about that on the wiki page to prevent other /dumb/ questions
like mine ?
Thanks again and congrats for this great binding :)
Romain.
¹: http://code.google.com/p/javacv/wiki/OpenCV2_Cookbook_Examples
²: «The above C++ example translated to Scala using JavaCV wrapper:»
Original comment by rom1dep
on 21 Jun 2012 at 9:31
Oh I see, we'll notify Jarek about this... :) thanks!
Jarek, you may close once the example has been clarified, thanks!
Original comment by samuel.a...@gmail.com
on 21 Jun 2012 at 9:34
Thanks for pointing this out.
I do not see explanation of gamma argument to CanvasFrame in
https://code.google.com/p/javacv/source/browse/README.txt
It is quite unusual that by default image is modified before display.
I corrected examples in the Wiki to explicitly specify gamma=1, similar in the
source code.
Original comment by jarek.li...@gmail.com
on 22 Jun 2012 at 1:14
Great, thanks!
It is unusual for desktop applications, but for computer vision, we usually
need to work on images with linear intensities, so personally I think the right
way is to apply gamma correction on these images by default.
Besides, Java considers gray images as linear by default:
http://docs.oracle.com/javase/6/docs/api/java/awt/image/BufferedImage.html#TYPE_
BYTE_GRAY
So, I'm merely doing it the Java way :)
Original comment by samuel.a...@gmail.com
on 22 Jun 2012 at 8:57
Original issue reported on code.google.com by
rom1dep
on 18 Jun 2012 at 11:13