Thats a good start. A more theoretical approach, is to look at each pixel as a vector representation for the basis RGB. You take each pixel's vector and project this color vector onto the red basis (just the red component). Then you take the length of this vector and compare against some "red" color threshold. The red color threshold would be the distance away from the color red. If its within the bounds of the color "red" then you accept the pixel as being red or close to red. I hope this helps.
--- comp knight <[EMAIL PROTECTED]> wrote: > Hi, > > In a bit-map image of 24bpp(bits per pixel) 3 consecutive > bytes give > information > regarding the color of a pixel ,1 byte each for each of > the three colors => > red,blue and green. > But i am not sure about the order in which these colors > are stored,probably > its G R B.(?) > So by comparing these 3 bytes of the pixel > representation with (0 255 0) > you can detect if its Red or not > > Adios > > On 2/21/07, krome152001 <[EMAIL PROTECTED]> wrote: > > > > i was wondering how can i detect the color red in a > pic in bitmap > > format?? if someone can show me how that can be done or > give me some > > advice. thanks alot of your help > > Ricardo > > > > > > > _________________ Joseph A. Marrero http://www.l33tprogrammer.com/ ____________________________________________________________________________________ Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367
