Re: Dealing with MONO12 images in memory
Bob Friesenhahn <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 21 Nov 2017, Robert H. Olsen wrote: > > Thank you very much for your quick reply Bob. > This works very well when I limit the camera to MONO_8 images. I am still > having trouble with the 12 bit images, but I need to verify my own code (I > may have may some mistakes refactoring to use GraphicsMagick) before I > assume the problem is with how I am calling your functions. I found this documentation for something called MON012: https://www.manualslib.com/manual/796839/Basler-Gige-Vision-Cameras.html?page=161 If this format matches what you are using, then read it as if it is a 16-bit format and just scale up the samples. Without scaling the image will look very dark. The documentation says that the 16-bit data is in little-endian format. As a quick check, use the normalize algorithm on the image and you should immediately see a recognizable image. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot