Click here to Skip to main content
15,902,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Detect color Using C++ Pin
Hamid_RT20-Feb-07 17:35
Hamid_RT20-Feb-07 17:35 
GeneralRe: Detect color Using C++ Pin
prasad_som20-Feb-07 18:08
prasad_som20-Feb-07 18:08 
AnswerRe: Detect color Using C++ Pin
Stephen Hewitt20-Feb-07 19:24
Stephen Hewitt20-Feb-07 19:24 
AnswerRe: Detect color Using C++ Pin
Mark Salsbery21-Feb-07 8:50
Mark Salsbery21-Feb-07 8:50 
GeneralRe: Detect color Using C++ Pin
ricardo montemayor21-Feb-07 13:26
ricardo montemayor21-Feb-07 13:26 
GeneralRe: Detect color Using C++ Pin
Mark Salsbery21-Feb-07 14:48
Mark Salsbery21-Feb-07 14:48 
GeneralRe: Detect color Using C++ Pin
ricardo montemayor21-Feb-07 16:17
ricardo montemayor21-Feb-07 16:17 
GeneralRe: Detect color Using C++ Pin
Mark Salsbery21-Feb-07 16:43
Mark Salsbery21-Feb-07 16:43 
Depends on the pixel format.

Assuming you are working with RGB data (24-bit/32-bit):

Are you looking for an exact color or fairly close to a color? Using red as an example...

The easiest method is to look for an exact color. Say you want to find bright red - just look
for pixels with value RGB(0xFF,0x00,0x00).

Somewhere in the middle of complexity would be to look for pixels with the red component a
certain percentage higher than the green and blue components. For example, a pixel with value
of RGB(0xFF,0x21,0x32) would be considered red but one with value RGB(0xFF,0x84,0xA8) wouldn't.
This method kind of finds the "redest" pixels.

Then you can get complex with images that are similar but maybe vary in intensity (microscope
slides stained with a certain color comes immediately to mind Smile | :) ). You could create a histogram
using all the pixels in the image and use the result to help automagically detect the proper
percentage mentioned in method 2.

"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."

QuestionIntercepting Output from another application Pin
shatterstar645720-Feb-07 13:19
shatterstar645720-Feb-07 13:19 
AnswerRe: Intercepting Output from another application Pin
Stephen Hewitt20-Feb-07 13:27
Stephen Hewitt20-Feb-07 13:27 
AnswerRe: Intercepting Output from another application Pin
ThatsAlok21-Feb-07 6:10
ThatsAlok21-Feb-07 6:10 
QuestionUniversal Progress Dialog Pin
BuckBrown20-Feb-07 12:38
BuckBrown20-Feb-07 12:38 
AnswerRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 12:41
Stephen Hewitt20-Feb-07 12:41 
GeneralRe: Universal Progress Dialog Pin
BuckBrown20-Feb-07 13:07
BuckBrown20-Feb-07 13:07 
GeneralRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 13:09
Stephen Hewitt20-Feb-07 13:09 
GeneralRe: Universal Progress Dialog Pin
BuckBrown20-Feb-07 13:46
BuckBrown20-Feb-07 13:46 
GeneralRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 13:53
Stephen Hewitt20-Feb-07 13:53 
GeneralRe: Universal Progress Dialog Pin
BuckBrown21-Feb-07 5:35
BuckBrown21-Feb-07 5:35 
GeneralRe: Universal Progress Dialog Pin
Stephen Hewitt21-Feb-07 11:56
Stephen Hewitt21-Feb-07 11:56 
QuestionMultiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 10:55
Demosthenes Tecumseh20-Feb-07 10:55 
AnswerRe: Multiple list boxes in main window Pin
PJ Arends20-Feb-07 11:46
professionalPJ Arends20-Feb-07 11:46 
GeneralRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 12:10
Demosthenes Tecumseh20-Feb-07 12:10 
JokeRe: Multiple list boxes in main window Pin
Mark Salsbery20-Feb-07 12:41
Mark Salsbery20-Feb-07 12:41 
AnswerRe: Multiple list boxes in main window Pin
Stephen Hewitt20-Feb-07 12:43
Stephen Hewitt20-Feb-07 12:43 
GeneralRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 13:44
Demosthenes Tecumseh20-Feb-07 13:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.