Click here to Skip to main content
15,891,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to threshold an image? Pin
uus9922-Jan-04 8:42
uus9922-Jan-04 8:42 
GeneralRe: How to threshold an image? Pin
J. Eric Vaughan22-Jan-04 10:58
J. Eric Vaughan22-Jan-04 10:58 
GeneralRe: How to threshold an image? Pin
uus9922-Jan-04 18:12
uus9922-Jan-04 18:12 
GeneralRe: How to threshold an image? Pin
J. Eric Vaughan23-Jan-04 3:59
J. Eric Vaughan23-Jan-04 3:59 
GeneralRe: How to threshold an image? Pin
uus9923-Jan-04 23:00
uus9923-Jan-04 23:00 
AnswerRe: How to threshold an image? Pin
John M. Drescher21-Jan-04 9:51
John M. Drescher21-Jan-04 9:51 
AnswerRe: How to threshold an image? Pin
cmk21-Jan-04 9:51
cmk21-Jan-04 9:51 
AnswerRe: How to threshold an image? Pin
uus9921-Jan-04 16:30
uus9921-Jan-04 16:30 
John
>>Can you get the hardware to give you a pointer to the image data instead of ploting it to a dc?

The pointer to the image buffer is (void *)ImaqBuffer, however, i do not know the structure of data in it. The only way i can access it is by plotting to DC.

>>I would have expected to take the pixel color, get its grey value, and check that against a threshold value of 128 (or whatever).

I know, my comparison is just too crude. Thanks. I'll try that, but i still have to check all the pixels using SetPixel & GetPixel which is too slow. I need it fast.


>>Haven't messed with bitmaps in a while, but try GetBitmapBits(), which will give you an array of bytes containing the bitmap. Then run through this array changing values. Then call SetBitmapBits() with the modified array. This should be much faster.

I havent try this, but i will. I'll see how fast it is.

Btw, i've tried this.
1. Open a color bmp from disk and change it to B&W using LR_MONOCHROME
2. Open a color bmp, load into DC and do setpixel and getpixel.

The first method is way faster.. How come? I need a way to convert that fast. But, i want to do everything in memory to overcome disk read overhead.

Although, in this case, the 1 method is still faster, although i'm reading from disk.



AnswerRe: How to threshold an image? Pin
Ryan Binns21-Jan-04 17:28
Ryan Binns21-Jan-04 17:28 
Questionthe system protect in 2k and xp ?? Pin
Anonymous21-Jan-04 4:47
Anonymous21-Jan-04 4:47 
AnswerRe: the system protect in 2k and xp ?? Pin
Matt Newman21-Jan-04 5:40
Matt Newman21-Jan-04 5:40 
AnswerRe: the system protect in 2k and xp ?? Pin
Antti Keskinen21-Jan-04 5:42
Antti Keskinen21-Jan-04 5:42 
GeneralBest way to display a text file as a resource Pin
doctorpi21-Jan-04 4:06
doctorpi21-Jan-04 4:06 
GeneralRe: Best way to display a text file as a resource Pin
Roger Allen21-Jan-04 4:42
Roger Allen21-Jan-04 4:42 
Generalcustom class wizard Pin
red2k421-Jan-04 3:50
sussred2k421-Jan-04 3:50 
GeneralRe: custom class wizard Pin
Antti Keskinen21-Jan-04 5:49
Antti Keskinen21-Jan-04 5:49 
GeneralNon-blocking Socket getting block on WSASend Pin
Member 73613721-Jan-04 3:20
Member 73613721-Jan-04 3:20 
GeneralRe: Non-blocking Socket getting block on WSASend Pin
valikac21-Jan-04 11:28
valikac21-Jan-04 11:28 
GeneralRe: Non-blocking Socket getting block on WSASend Pin
Anonymous22-Jan-04 2:19
Anonymous22-Jan-04 2:19 
Generalcreating Access ODBC Data Source at runtime Pin
bmvbab21-Jan-04 3:11
bmvbab21-Jan-04 3:11 
GeneralRe: creating Access ODBC Data Source at runtime Pin
David Crow21-Jan-04 4:53
David Crow21-Jan-04 4:53 
Questionhow to extract a single bitmap from .avi file? Pin
andreas.schaerer21-Jan-04 3:10
andreas.schaerer21-Jan-04 3:10 
AnswerRe: how to extract a single bitmap from .avi file? Pin
Ted Ferenc21-Jan-04 3:19
Ted Ferenc21-Jan-04 3:19 
GeneralRe: how to extract a single bitmap from .avi file? Pin
andreas.schaerer21-Jan-04 3:30
andreas.schaerer21-Jan-04 3:30 
GeneralRe: how to extract a single bitmap from .avi file? Pin
Ted Ferenc21-Jan-04 3:48
Ted Ferenc21-Jan-04 3:48 

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.