First time here? Check out the FAQ!

Ask Your Question
1

How to display a raw image using Opencv

asked May 14 '13

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.

Preview: (hide)

2 answers

Sort by » oldest newest most voted
1

answered May 14 '13

updated May 14 '13

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.

Preview: (hide)
-1

answered May 14 '13

AMP gravatar image

Check out DCRaw

Preview: (hide)

Comments

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

StevenPuttemans gravatar imageStevenPuttemans (May 14 '13)edit

Question Tools

Stats

Asked: May 14 '13

Seen: 9,784 times

Last updated: May 14 '13