Ask Your Question

Ilias's profile - activity

2020-09-07 20:44:20 -0600 received badge  Popular Question (source)
2017-09-04 16:11:24 -0600 received badge  Nice Question (source)
2013-01-08 15:42:21 -0600 received badge  Student (source)
2012-08-08 09:57:31 -0600 commented question OpenCV JPEG 12-bit support

Changed BITS_IN_JSAMPLE to 12 in jmorecfg.h but OpenCV won't build :-( There's type mismatches in grfmt_jpeg.cpp. OpenCV expects uchar but gets ushort instead. So looks like OpenCV does not take into account the BITS_IN_JSAMPLE macro to configure itself accordingly. Shame.

Would it be complete madness to attempt to fix this myself? The type errors seem to be located only in grfmt_jpeg.cpp and don't seem that hard to fix. I am a bit concerned though that any changes in here will cascade to the rest of the OpenCV library. Are there any gurus that know this part of the code? Any advice?

2012-08-08 08:01:10 -0600 commented question OpenCV JPEG 12-bit support

I shall try this thanks a lot.

However, my understanding is that I still need to recompile libjpeg for 12-bit support (as this library is in charge of encoding/decoding jpeg images).

I ll have a go and post back.

2012-08-08 07:14:00 -0600 asked a question OpenCV JPEG 12-bit support

I am working on a project that requires processing grayscale JPEG images with 12-bit depth per pixel. Does OpenCV support 12-bit JPEG images?

The 3rd party library 'libjepg' used by OpenCV supports 12-bit JPEG's but needs to be built for 12-bit support. The macro that defines 8/12-bit support is BITS_IN_JSAMPLE in jmorecfg.h under opencv/3rdparty/libjepg.

If I change that macro to 12-bit and rebuild OpenCV, am I good to go? Or does this mess up the internals of OpenCV?