camera - Save 12-bit image (0-4095) to png file using openCV -


I know that openCV treats 12-bit image as u16, but aligns most bits on the left. So if I just want to write raw data (with 12-bit below the windows-GC 660m), then my image looks completely black, I think the windows do not know that the dynamic range of my image 0-40 9 5 I then use the Labview image package to verify the correct data, and then save it to PNG. This time Windows 7 can display my image with the correct category. What do I remember when using OpenCV?

Sorry if I did not clarify the question before. After doing a little research, I got the answer. Therefore, to see the PNG file properly, the data (12-bit) is shifted to the left of the full bit depth (16-bit), then fill with the empty (right 4-bit) most important bit. For example:

3144 = 0b 0000 1100 0100 1000 50316 = 0b 1100 0100 1000 1100

All three programs (Matlab, Labview, and OpenCV) used to write the left-replication image, but only use LabWave sbit (critical bits) By default part of the PNG format; Thus read the image value correctly. The other two may need to make a slight shift after loading.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -