Ask Your Question
1

How to display a raw image using Opencv

asked 2013-05-14 09:15:17 -0600

hayden gravatar image

Hello everybody, I have a raw image of 256 X 256 with 8 bits per pixel. I need to work on this raw image. My first question is how to display a raw image with opencv? Thanks in advance.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-05-14 09:31:22 -0600

updated 2013-05-14 09:33:05 -0600

Since you have a raw 8 bit image, create a matrix that has the data size and then load your image into it.

Mat input = Mat(256, 256, CV_8UC1);
input = imread("file_location.raw", 1);

This will give you the raw data inside a matrix element, ready for processing.

edit flag offensive delete link more
-1

answered 2013-05-14 09:31:34 -0600

AMP gravatar image

Check out DCRaw

edit flag offensive delete link more

Comments

Why use other software if you can do it with openCV functionality?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-05-14 09:34:07 -0600 )edit

Question Tools

Stats

Asked: 2013-05-14 09:15:17 -0600

Seen: 9,604 times

Last updated: May 14 '13