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

C / C++ / MFC

 
GeneralRe: ShellOpen Pin
Gary Kirkham21-Jan-04 5:59
Gary Kirkham21-Jan-04 5:59 
QuestionHow to threshold an image? Pin
uus9921-Jan-04 5:41
uus9921-Jan-04 5:41 
AnswerRe: How to threshold an image? Pin
J. Eric Vaughan21-Jan-04 6:24
J. Eric Vaughan21-Jan-04 6:24 
GeneralRe: How to threshold an image? Pin
uus9921-Jan-04 23:25
uus9921-Jan-04 23:25 
GeneralRe: How to threshold an image? Pin
J. Eric Vaughan22-Jan-04 6:01
J. Eric Vaughan22-Jan-04 6:01 
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 
The function for thresholding works extremely fast compared by using SetPixel and GetPixel. However, i got another problem now.

My camera (frame grabber) returns the captured image in a CDC object only. And not in a Cbitmap. A CDC object does not have SetBitmapbits and GetBitmapBits members, so i cant call those. I can only access pixels in CDC using GetPixel and SetPixel. (Correct me if i'm wrong). And using Get & SetPixel is too slow, hence i needed a faster algorithm which you came up with. To use getbitmapbits, the object must be a CBItmap.

However, my question is now, how to copy contents of a CDC/DC buffer or object (already contains data) to a CBitmap object for processing, and then back to CDC object?

//------------custom hardware function that draws image from camera to DC-----------//
imgPlot ((GUIHNDL)MemDC.GetSafeHdc(), (void *)ImaqBuffer, 0, 0, Big, Big, 410, 10, plotFlag));
//-------------------------------------------

MemDC is a DC. Now contains an image copied from the camera buffer (ImaqBuffer) using a driver function.

How to copy MemDC to a CBitmap and do the thresholding with the function you came up with?

After finishing, how to copy the CBitmap back to MemDC for plotting on window etc.

THanks for the great help.
Smile | :)


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 
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 

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.