Author Topic: New member - Saying Hi + needs some help with getpixel programming  (Read 2668 times)

NiTRoP

  • Guest
Hi all - Im new to this forum!

Nice to see that there’s forums for everything :)

I’ve been out of the programming loop for 6-7 years now, did some simple programming in collage, perhaps I was using Borland compiler back then if there is something called that. Can’t really remember. Anyway, it was C++

To day I’m working as a Engineer in a rolling mill, got an MBA in material science. So right now I have allot of other info to dig through before I get back to my old programming knowledge. But I’m starting to realize I might need my old skills in this job too  :o

What I’m trying to do here is to write a program that can "look" at a video screen and determine whether a light strip over the screen is linear or slightly bent at some point. Since I can’t use pictures from my workplace I will illustrate the same thing with a sun set  :P. In this case I want to check what pixels in the screen is white or at least whiteish.



So the first step is to make the program recognize the light strip. For this I was thinking I could use getpixel() function to check each pixel in a screenshot for its color. If the color rgb corresponds to a certain value I want to ad that pixels coordinate to a diagram as one data point. Doing this for the whole screenshot would hopefully result in a diagram that corresponds to the light strip. See the very beautiful “paint” illustration where all the pixel that are white now generated a data points as black. The green line in the right picture is a linear approximation of all the data points. I also want to check if a log or a power function generates a better aproximation of the datapoints but thats a later problem.

So, Ive started out with a Win32 GUI project in blocks. Is that a good start for me?
If so how can I load an image and check the pixels?

Cheers



Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: New member - Saying Hi + needs some help with getpixel programming
« Reply #1 on: March 16, 2010, 06:16:53 pm »
Absolutely unrelated to Code::Blocks, thus violating our forum rules.

Topic locked !