i'm doing a project like u,but i have problem with disparity map.the nearer thing is dark and thing far away from camera is bright.can u show your code.i very grateful about that
Hi. I'm trying to use this with two logictech webcams. The result is really poor, not as good as this. Do you have tips for the set up of the stereo rig?
How far apart and at what angles should the cameras be before calibration?
Is individual calibration of the cameras a wise step before stereorectify?
My code works well for the example images that come with OpenCV. Just not with these two cameras as a stereo-rig.
@MrCybin Hi MrCybin. I put the cameras very close (as close as possible, probably 4 or 5 inches). I didn't calibrate the cameras, I just used them straight ahead, but it seems that calibration is a must for good results. Well, I believe that the best solution for depth image nowadays is using Kinect, as my webcam results aren't good neither... :)
It was made a long time ago and I don't have that back, but I used default OpenCV parameters. One thing I did was using cameras from the same brand and model, and one thing that would enhance the results would be calibrating the cameras :)
I'm using highgui for output, for sure. It won't be a problem if you open another window for that. I guess most of this code comes from OpenCV samples, if I'm not mistaken.
I guess better results should come had I calibrated the cameras first.
looks pretty good. are you using highgui for your output? i always get a simplified version of the image and have to save them, and then open them up outside of my program to see my output correctly
thanks a lot danny, I read your suggestions and i finnally fix my results, but now I have another problem....you see, I tried to go further on the Learning Opencv's example of the chapter 12 by using the cvRepreojectImageto3D() function, but well, it seems that it only works when you feed the set of images from the sample file... I tried to feed my own set of image pairs but it doesn't work at all....could you please help me???
depthmap is a distance function, so for, each pixel, there should be a scalar value, not 3 values, as it is common for color images. Just check that you are not printing the results in a color channel like red, green or blue.
@page47250 Well, that one was in a Vista system. I didn't have problems with 2 webcams. They worked out of the box. I just changed the indexes as I would normally do in the capture frame functions.
Would you share the model names of the webcams? I'm buying cams, so I would appreciate some advice regarding webcam models that work in pair simultaneously possibliy on win7.
@page47250 Sure. They were 2 Logitech® Webcam Pro 9000. I think Logitech has got the best image quality. I take Ps3 eye as a great fast webcam, but I haven't tested 2 Ps3 eyes. 2 Logitechs went just fine.
I am not calibrating so far... I tried changing the parameters, but it didn't go well... so I ended up getting the default ones... I can check them later, though I think it's still not a good result...
I am really not seeing much difference calibrating, though it might make a lot of difference for far objects.
Yes, This is seems to be Great. If u change the window size(Block Size) , then you can get a better Result. BM is best Algo for Real time App.
7hanansan 7 months ago
This has been flagged as spam show
i'm doing a project like u,but i have problem with disparity map.the nearer thing is dark and thing far away from camera is bright.can u show your code.i very grateful about that
trandinhhieu1989@gmail.com
trandinhhieu 8 months ago
Hi. I'm trying to use this with two logictech webcams. The result is really poor, not as good as this. Do you have tips for the set up of the stereo rig?
How far apart and at what angles should the cameras be before calibration?
Is individual calibration of the cameras a wise step before stereorectify?
My code works well for the example images that come with OpenCV. Just not with these two cameras as a stereo-rig.
Thanks,
D
MrCybin 8 months ago
@MrCybin Hi MrCybin. I put the cameras very close (as close as possible, probably 4 or 5 inches). I didn't calibrate the cameras, I just used them straight ahead, but it seems that calibration is a must for good results. Well, I believe that the best solution for depth image nowadays is using Kinect, as my webcam results aren't good neither... :)
Kind regards,
Daniel
dannyxyz22 8 months ago
@MrCybin Thanks for getting back to me. Could i email you some results so you can see what is going wrong?
MrCybin 8 months ago
Hi, can you show your input Parameters with correspondence block matching algorithm .
Mine is: BMState->preFilterSize=41; BMState->preFilterCap=31; BMState->SADWindowSize=41; BMState->minDisparity=-64; BMState->numberOfDisparities=128; BMState->textureThreshold=10; BMState->uniquenessRatio=15;
But it seem not good
Thanks.
VanDucTech 10 months ago
@VanDucTech Hi VanDuc :)
It was made a long time ago and I don't have that back, but I used default OpenCV parameters. One thing I did was using cameras from the same brand and model, and one thing that would enhance the results would be calibrating the cameras :)
Kind regards,
Daniel
dannyxyz22 10 months ago
Hi sekomaru,
I'm using highgui for output, for sure. It won't be a problem if you open another window for that. I guess most of this code comes from OpenCV samples, if I'm not mistaken.
I guess better results should come had I calibrated the cameras first.
Best regards,
Daniel
dannyxyz22 1 year ago
looks pretty good. are you using highgui for your output? i always get a simplified version of the image and have to save them, and then open them up outside of my program to see my output correctly
sekomaru 1 year ago
thanks a lot danny, I read your suggestions and i finnally fix my results, but now I have another problem....you see, I tried to go further on the Learning Opencv's example of the chapter 12 by using the cvRepreojectImageto3D() function, but well, it seems that it only works when you feed the set of images from the sample file... I tried to feed my own set of image pairs but it doesn't work at all....could you please help me???
Thanks in advance!!!
diabelliforlife 2 years ago
@diabelliforlife Sorry... haven't tried those... yet :)
dannyxyz22 1 year ago
I have a question for somone who will be interested in help me .... :D
I actually worked on producing the depth map...but i don't know why my image results in a color depth map!!! :S
could anyone explain me why???? :S
I mean...is my result wrong?
diabelliforlife 2 years ago
Hi,
depthmap is a distance function, so for, each pixel, there should be a scalar value, not 3 values, as it is common for color images. Just check that you are not printing the results in a color channel like red, green or blue.
Best regards,
Daniel
dannyxyz22 2 years ago
@dannyxyz22 Hello,
which webcams are you using and what OS?
Didi you have any problems with 2 webcams working simultaneously?
page47250 1 year ago
@page47250 Well, that one was in a Vista system. I didn't have problems with 2 webcams. They worked out of the box. I just changed the indexes as I would normally do in the capture frame functions.
Best regards
dannyxyz22 1 year ago
@dannyxyz22 Thanks for replying!
Would you share the model names of the webcams? I'm buying cams, so I would appreciate some advice regarding webcam models that work in pair simultaneously possibliy on win7.
page47250 1 year ago
@page47250 Sure. They were 2 Logitech® Webcam Pro 9000. I think Logitech has got the best image quality. I take Ps3 eye as a great fast webcam, but I haven't tested 2 Ps3 eyes. 2 Logitechs went just fine.
Kind regards,
Daniel
dannyxyz22 1 year ago
Well, the closer I've tried were as much as the Logitech allowed me... have you got better results?
dannyxyz22 2 years ago
yours look way better! i think i miss some important calibration step,
how do you calibrate?
without any extra calibration or undistortion i get nearly the same results as with what i tried for now..
StrNase 2 years ago
Really?!
I am not calibrating so far... I tried changing the parameters, but it didn't go well... so I ended up getting the default ones... I can check them later, though I think it's still not a good result...
I am really not seeing much difference calibrating, though it might make a lot of difference for far objects.
Well, I'll follow your channel for the updates :)
Kind regards,
Daniel
dannyxyz22 2 years ago
ok, i used cvFindStereoCorrespondence() at first..
cvFindStereoCorrespondenceBM() seems to work much better :)
StrNase 2 years ago
rectification should solve this..
when playing with the cam angles i can get slightly better results.. not only black and white, but also different gray, nearly as it should look like.
just tried to get around this step for the other tests.. :)
are you doing this just for fun or is there some "bigger" on your mind?
StrNase 2 years ago
have you tried different distances between the cams?
StrNase 2 years ago