-
February 18th, 2012, 04:21 AM
#1
Image Processing algo in C to measure are of a image
Hi everyone.....
I am new to this forum..
I am familiar with C++ , but I am new to the world of digital
image processing...
I have hardly any clue about the sytax used in
image processing... and i am given an
assignment on it ..
I have been given a ppm(its a binary ppm image) image of Great Salt Lake and I need to write a image processing algorithm in C/C++ which measures area of lake in pixels
and also i have to create a mask image by labelling lake in white pixels and remaining in black..
Can any of you please tell me how to proceed about it??
or something where i can get the the functions/codes
related to it..
-
February 18th, 2012, 08:01 AM
#2
Re: Image Processing algo in C to measure are of a image
I'm no expert on image processing either, but I guess creating the mask image is the first step that should be done here. In order to accomplish that, you'll likely need to do some color proximity calculations, and here's an - IMO - quite interesting thread that probably at least will give you an idea of what that's about: http://www.codeguru.com/forum/showthread.php?t=306787
Once you have the mask, it shouldn't be too complicated anymore to determine the area covered by its white pixels.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
February 20th, 2012, 04:34 AM
#3
Re: Image Processing algo in C to measure are of a image
If the lake is of an even colour or has distinct edge boundaries then some sort of flood fill may work. Starting with a point known to be within the lake, the algorithm could flood fill the neighbouring pixels with white. It would then be a simple task to turn every other pixel that was not white, to black.
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
-
February 21st, 2012, 06:49 AM
#4
Re: Image Processing algo in C to measure are of a image
^Is there any actual c code to detect the edge(like Prewitts algorithm) in an ppm(Binary aka P6) file?
-
February 21st, 2012, 12:24 PM
#5
Re: Image Processing algo in C to measure are of a image
Don't focus on the fileformat itself. Read the imagefile to a buffer and start working on the buffer. This way it doesn't matter which fileformat you are using.
-
February 21st, 2012, 12:41 PM
#6
Re: Image Processing algo in C to measure are of a image
Originally Posted by Skizmo
Don't focus on the fileformat itself. Read the imagefile to a buffer and start working on the buffer. This way it doesn't matter which fileformat you are using.
thanks for your reply.. I did it actually, i do have d program to read it into a buffer..But i am confused wid what to do next. How can i use it to detect the edges of d lake..?
-
February 21st, 2012, 12:49 PM
#7
Re: Image Processing algo in C to measure are of a image
It is unlikely your teacher would have assigned this project without giving you the tools necessary to accomplish it. Check your textbook and/or class notes and/or powerpoint slides.
Edge detection is non-trivial, but also not *that* difficult of an algorithm. The harder part is determining which edges are the boundaries of the lake.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|