|
Anu_Bala wrote: if (fod ==1)
{
BOOL OpenReadFile()
}
I think that it is better:
if (fod ==1)<br />
{<br />
OpenReadFile();<br />
}
|
|
|
|
|
Hi _Russell_
can you say whats question?why these question are hide(2 once)
|
|
|
|
|
I know that usually girls run away from me , but....
Do you know if it could be related with this men's behaviour?
|
|
|
|
|
I think you need to remove the BOOL in front of OpenReadFile. You are declaring a function inside the OnYes function. Of course, doing that won't call the OpenReadFile function
Anu_Bala wrote: But it does not get in to the loop
First, it's not a loop but a condition and second I think you didn't test properly if it entered the condition (you just checked if the function get called), am I right ?
|
|
|
|
|
Please, don't delete your post once you get an answer to your question. This is considered selfish. This forum is there to share information, how can people learn from your mistake if you delete your post ?
Everybody is doing mistakes, it's not something to be ashamed of.
|
|
|
|
|
|
toxcct wrote: look at his profile, you'll understand the character
|
|
|
|
|
|
Yes, but what's wrong with his profile ?
|
|
|
|
|
|
toxcct wrote: here[^] !
You mean that he's the No. "1" winner ?!
Maxwell Chen
|
|
|
|
|
|
Well said cederic, but as said by toxcct, she's been a real nonsense
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: Yup! Did you check your mail buddy??
Which mail Buddy!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Which "Which mail" buddy ?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: Which "Which mail" buddy ?
Mail you mention in your post
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Cedric Moonen wrote: Everybody is doing mistakes, it's not something to be ashamed of.
You are WRONG! It is something to be ashamed of!
Wait ... no you are correct, my mistake :->
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Hallo guys,with in 12 hrs you r people getting very tensed. Really iam very sorry...Yesterday I posted my question...But within 3 seconds i found out my mistake and i got solution.Thts why i deleted my message.When i deleted my question there was no answer.Thats why i deleted my question.
Just i deleted BOOL in front of the function call.I got solution.
Really Im very sorry, iam not selfish and nonsense...OK...
|
|
|
|
|
Hi,
What is good starting point to learn about RAS API's for Win2k (or) Does MFC contains RAS API's? Suggest me good book which teaches. Is RAS API's differ from OS to OS. I have to work on dial-up networking project which uses RAS API's.
|
|
|
|
|
subramanyeswari wrote: Does MFC contains RAS API's?
No.
The Remote Access Service Reference[^] might help.
also found this codeproject article[^] there may be more. Try Google.
"What classes are you using ? You shouldn't call stuff if you have no idea what it does" Christian Graus in the C# forum
led mike
|
|
|
|
|
Greetings.
I have modified the code from the Simultaneous Previewing & Video Capture using DirectShow written by Sivasagar K.R in www.codeguru.com (see below). When I run it, it uses the *ptr pointer to render the pixels on screen, but I want to analyse the pixels for each frame, rendering the analysed pixels.
In essence, I want to save the pixels (as I do in the array CurImaArr) and then do some analysis on them, maybe change some values, and then render them. Any ideas on how to do so?
Your help would be very much appreciated.
bool CVMR_Capture::Convert24Image(BYTE *p32Img, BYTE *p24Img,DWORD dwSize32)<br />
{<br />
<br />
if(p32Img != NULL && p24Img != NULL && dwSize32>0)<br />
{<br />
<br />
DWORD dwSize24;<br />
<br />
dwSize24=(dwSize32 * 3)/4;<br />
<br />
BYTE *pTemp,*ptr;<br />
pTemp=p32Img;<br />
<br />
ptr=p24Img + dwSize24-1 ;<br />
<br />
int ival = 0;<br />
int count = 0;<br />
int witth = 1;<br />
int hite = 0;<br />
int hites = 120;<br />
int greens = 0;<br />
for (DWORD index = 0; index < dwSize32/4 ; index++)<br />
{ <br />
unsigned char r = *(pTemp++);<br />
unsigned char g = *(pTemp++);<br />
unsigned char b = *(pTemp++);<br />
(pTemp++);
if ((witth <= 320) && (hite < 240))<br />
{<br />
CurImaArr [witth-1][hite] = g;<br />
}<br />
else<br />
{<br />
return false;<br />
} <br />
<br />
<br />
<br />
<br />
<br />
if (g > 150)<br />
{<br />
greens++;<br />
}<br />
<br />
<br />
*(ptr--)= 0;
*(ptr--)= CurImaArr [witth-1][hite];
*(ptr--)= 0;
<br />
witth++;<br />
<br />
if (witth >= 320)<br />
{<br />
witth = 1;<br />
hite++;<br />
}<br />
<br />
<br />
}<br />
<br />
<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
<br />
return true;<br />
}
|
|
|
|
|
Lessthannovice wrote: it uses the *ptr pointer to render the pixels on screen
Actually it doesn't. You can't use this method to do what you want. Build a filter graph with the Sample Grabber filter instead.
|
|
|
|
|
Thanks for the clarification.
I have done the following:
int count1;
int count2;
ptr = p24Img + dwSize24-1 ;
for (count2 = 0; count2 < 239 ; count2++)
{
for (count1 = 0; count1 < 319; count1++)
{
*(ptr--) = 0;
*(ptr--) = CurImaArr[count1][count2];
*(ptr--) = 0;
}
}
After the "for" loop, and within the "if" "section". It renders the image fine. I thought I could manipulate the array and then use it to render the image. I expect there is a much better way of doing it (and in better programming way) - any suggestions welcome - but for me, any step I take in this language/project feels like a combination of IQ test and unsolvable puzzle.
"Build a filter graph...instead" : easier said than done. I'll look into it, but any suggestions are welcome.
Finally, I would like to thank you for your continuous help and support.
|
|
|
|
|
I have reread your previous message and perhaps I have misunderstood your problem. If you only need to perform analysis on a particular image capture, and not all the images on your webcam, then this approach would work. And if by render, you mean not by the video renderer, but by displaying as a bitmap in a static control.
You would not want to perform your analysis / manipulation in the Convert24Image function as this only runs when the image is 32-bit, and I can't really find any indication that this is always true. You might want to do it in GrabFrame() instead.
Building filter graphs is much easier when working with the ICaptureGraphBuilder2 interface.
|
|
|
|
|
My aim is to detect if a particular event has occurred in the current frame. If it has then I want to analyse (basically delineate) the event, and clear the picture from "noise".
Thanks for the GrabFrame() suggestion. I had not thought of it and it is a valid point.
I am not familiar with the ICaptureGraphBuilder2 interface, but I will have it in mind for the future.
My aim now is to be able to save an array of an image in which an event has occurred (ideally with a dialogue box offering the user the option of saving or not) and be able to retrieve the array and show the image on screen. Also, I am thinking of doing all the "analysis" in a separate function (instead of GrabFrame() or Convert24Image() ). Any suggestions welcome.
It's a slow and involved process, but I am learning a lot, and every time I achieve a little bit more feels great.
Again, I appreciate your help so far.
|
|
|
|