Yaser Yacoob wrote:
In compiling CalibFilter, I am getting an error for a missing header
file, streams.h, that is supposed to be a Win2000 file. I cannot seem
to find anything about this file. Where is streams.h coming from?
(I am running on Win2000)
Many thanks,
Yaser
streams.h is not included in the Windows 2000 OS. It is part of the
DirectShow 6.0 SDK. To download this SDK:
http://download.microsoft.com/download/win98/dxm/6.0/W9XNT4/EN-
US/enduser.exe
NOTE: egroups may wrap the above URL because of it's length. Please
cut and paste carefully.
Once you download and install, you will need to tell compiler about
the include directory in the SDK.
Bob Davies
NOTE: by sending this request to Gary Bradski you were enlisted into
the egroups community for the Open Source Computer Vision Library.
To respond to this email or ask additional questions, send mail to
OpenCV@egroups.com and one of the vision community members will
respond to your question.
Mark,
Hi, we talked last week at CVPR about Intel's OpenCV project. I got
a copy of your disk and have installed it, but I am having some
problems. I am hoping that you or one of your colleagues can help me
out.
I have a DV camcorder with a firewire (1394) interface. The
Directshow filters included with the OpenCV library e.g.
CalibFilter.ax) seem to work fine; we build a directshow graph using
graphedt, hook the camera to the filter (graphedt automatically puts
the DV decoder in between), and run. We can successfully calibrate
our camera this way.
Unfortunately, none of the stand-alone demos can find the video
source. Is there some way that we can specify the input source? Have
you tried a DV camcorder, or any other firewire video source? (Note
that the DV stream needs to be decoded.) I am afraid that we are
Linux hackers, not Windows gurus, so we are a little out of our
element.
Also, we can compile all of the applications except one. The
CamShift demo includes "streams.h" (not <streams.h>), but does not
include a file of that name. There is a streams.h file in
XMedia\classes\base, but if we use that we get the following error
essages about undefined base classes:
c:\DXMEDIA\CLASSES\BASE\ctlutil.h(439) : error
C2504: 'IBasicVideo2' :
base class undefined
c:\DXMEDIA\CLASSES\BASE\sysclock.h(23) : error
C2504: 'IAMClockAdjust'
: base class undefined
This pair of messages is repeated three times. Any suggestions? (I
don't know if this error is related to our problems above.)
-- Bruce
----------------------------------------------------
Bruce A. Draper
Dept. of Computer Science
Colorado State University
Fort Collins, CO 80523
draper@...
(970) 491-7873 (work)
(970) 491-2466 (fax @ work)
---------------------------------------------------
OpenCV team, this is high priority, I will provide my answers, fill in for
me
-- Gary
-----Original Message-----
From: Trevor Darrell [mailto:trevor@...]
Sent: Tuesday, June 20, 2000 11:30 AM
To: gary bradski
Cc: cwren@...; Dana A Levine
Subject: Re: OpenCV
Hi,
Any idea about the following problems chris (and my urops here) have had?
>
>
> Big Question #1: In OpenCV\CVL_html\appPage\doc_calib.html the claim is
made
> that the filter graph editor is installed by DirectX 7.0 SDK. I installed
> the DirectX 7.0a SDK, I can't find graphed.exe anywhere. Where can I get
> it?
>
> Big question #2: Has OpenCV been run on Win98?
>
> HMMDemo uses vfw. Like many projects, it links against cvd and
cvlgrfmtsd,
> but those don't exits (debug versions?). My compiled version crashes.
The
> included binary runs fine. The included binary only allows selecting the
> WDM driver for the Creative camera (not the VFW one) and the Kodak camera
> (no VFW driver as far as I can tell). It only works with the Creative
> camera. Black screen with the Kodak, ignores the 3com completely.
>
> LKDemo uses vfw.
>
> CamShift doesn't do anything for me. It builds fine, but I don't see any
> video. Same for included binary. Don't see any video code in the source.
> Similarly, VMDemo doesn't use video, correct?
>
> So the DirectShow examples all filters?
>
> Chris
Trevor
As you can see, I've added you to opencv@egroups.com -- a web-based mailing
list for OpenCV. I've added you as read on web only, just go to
http://www.egroups.com
But I'll try and answer some here, I've written to the Russians to prepare
example code and to get you the stereo code that they've done so far. Some
answers below.
Gary
> -----Original Message-----
> From: Trevor Darrell [mailto:trevor@...]
> Sent: Tuesday, June 20, 2000 11:30 AM
> To: gary bradski
> Cc: cwren@...; Dana A Levine
> Subject: Re: OpenCV
>
>
> Hi,
>
> Any idea about the following problems chris (and my urops
> here) have had?
>
> >
> >
> > Big Question #1: In OpenCV\CVL_html\appPage\doc_calib.html
> the claim is made
> > that the filter graph editor is installed by DirectX 7.0
> SDK. I installed
> > the DirectX 7.0a SDK, I can't find graphed.exe anywhere.
> Where can I get
> > it?
Since I'm on NT 4.0, not Win2000 yet, I've only installed 6.0, but the SDK
should install
graphedit under c:\dxmedia\bin
> >
> > Big question #2: Has OpenCV been run on Win98?
> >
Yes, as we speak.
> > HMMDemo uses vfw. Like many projects, it links against cvd
> and cvlgrfmtsd,
> > but those don't exits (debug versions?).
Yes. This might be a glitch since we develop db. Either build the debug
version, or try renaming the current lib to cvlgrfmts.
My compiled
> version crashes. The
> > included binary runs fine. The included binary only allows
> selecting the
> > WDM driver for the Creative camera (not the VFW one) and
> the Kodak camera
> > (no VFW driver as far as I can tell). It only works with
> the Creative
> > camera. Black screen with the Kodak, ignores the 3com completely.
> >
> > LKDemo uses vfw.
Yes, I'll ask the team to look at this.
> >
> > CamShift doesn't do anything for me. It builds fine, but I
> don't see any
> > video. Same for included binary. Don't see any video code
> in the source.
Should just grab the direct show video source filter output. Team will take
a look.
> > Similarly, VMDemo doesn't use video, correct?
It uses project files -- two images of "boy"
> >
> > So the DirectShow examples all filters?
??
> >
> > Chris
>
>
-----Original Message-----
From: Small, Daniel [mailto:desmall@...]
Sent: Monday, June 19, 2000 7:31 AM
To: Jean-Yves Bouguet; gary.bradski@...
Subject: RE: CVPR paper
Dr. Bouguet, Dr. Bradski,
I hope CVPR went well and that open-cv was well recieved. We are setting up
a volumetric system at Sandia (similar to the one described in your paper),
and I was wondering if you could answer a few questions for me regarding
your system, and openCV calibration functions in general. We have run into
a couple of snags.
I wrote my own version of calibFilter by using the old alpha2 code as a
model for how to access the alpha3 64bit functions. It seems to work nicely
to recover the intrinsic parameters. I am using 2.6mm lenses, so I have alot
of distortion. I can use cvUndistort with the recovered parameters and I get
a nicely corrected image.
For my target I have a 6x4 checkerboard w/ 6" squares laminated to a 1"
thick piece of flat wood.
I tried to use the function cvFindExtrinsic64d function to recover the
extrinsic parameters in a global coordinate system for 6 cameras. The
target appears in different sizes in the 6 images, usually occupying about
100x100 pixels in a 720x486 size image.
I am getting back values that appear correct in the Z axis, but too small in
X & Y. The angles appear to be in radians. Are they euler angles?
Is this a reasonable thing to try with this function?
I tried to use an X-Z plane for my 3D model points. Can I use a 3D set of
parameters for my object points? I know the cvCalibrate function won't work
this way (I checked the code) because it expects an XY plane. I saw a bit
of this as well in the findExtrinsic code, but it was not as clear. It
looks like it is calculating the planar homography based on an XY plane.
Can I specify 3D points rather than planar points? Will it increase the
accuracy of the extrinsic fit? What methods would you recommend for
multi-camera registration?
I have some code that works fine for static multi-camera registration
(pinhole model) using 6 3D points from the environment. It is based on a
least-squares approximation. Can I use this code with these lenses by
undistorting the image using the cvUndistort function to correct for the
radial distortion. My hope is that I can use the resultant undistorted image
with a simpler pinhole model with the same center pixel & focal length
values that I recovered from using calibFilter.
Thanks for your time,
Dan Small
> -----Original Message-----
> From: Bouguet, Jean-Yves
> Sent: Sunday, June 18, 2000 2:13 PM
> To: Bradski, Gary; 'Pisarevsky, VadimX'; Chu, Michael H
> Cc: Liang, Bob; Bouguet, Jean-Yves; Grzeszczuk, Radek; Holler, Mark;
> Davies, Bob; Nefian, Ara V
> Subject: After CVPR + some feeback on... calibration ofcourse!
>
> Hi Vadim, Gary, and the others,
>
> I think that this CVPR release has been a success that went beyond my own
> expectations.
> Although time will really tell us the extend of the success, l think that
> all this hard work has really paid off!
>
> Vadim, Victor: WHAT A WONDERFUL WORK!! I hope you guys had a safe trip
> back home.
> I hope we will see each other again soon!
> (could you forward this message to Victor, I happen not to be able to find
> his email address)
>
>
> --------------------------------------------------------------------------
> --------------------------------------------------------------------
>
> I have compiled a list of comments/modifications/potential upgrades/...
> regarding the
> calibration tool after CVPR, taking into consideration all the feedback
> that I
> got there.
>
> Let me first mention an error that I just found (yesterday):
>
> I observed that the calibration filter assume that the (0,0) pixel
> is the lower left corner pixel of the image, instead of the upper left
> corner pixel (in the matlab code).
> In the HTML documentation attached to the C code, I had made the wrong
> assumption that the C code was using
> the same convention as the matlab code. That appears to be not true.
>
> Therefore, I updated the model description file
>
> OpenCV/CVL_html/appPage/cam_model.html
>
> changing the pixel convention at the bottom (I explain that the C
> implementation uses a
> different convention than the matlab implementation). I am including the
> modified
> file to this message. This very same explanation should also be added in
> the PDF doc, I suppose.
>
>
> Questions:
>
> 1. Is that right that the center of the lower left pixel is picked as
> (0,0) in the C code?
> (I just found out from experimentation, not looking at the code)
> 2. Is there a reason for that choice? Because, if not, I would prefer
> having the
> same convention as the matlab code, since most people use that
> convention (in computer
> vision, not in computer graphics, I know...). This choice leads to a Z
> axis pointing in the
> scene, and that's a lot more logical -> points in the scene have
> positive depth!
> Another reason I am asking is because this choice DOES change the
> values of two tangential distortion
> coefficients p1 and p2, since this distortion is function of the
> direction of the x and
> y image axes (that is not true for the radial distortion coefficients
> that are insensitive to
> the axes directions).
>
>
> Still regarding the tangential distortion, I observed that the PDF file
> does not have a word
> on the tangential distortion. That should be added in the end.
>
>
>
> I have received a series of feedback at CVPR on the calibration code that
> I consider very useful:
>
>
> 1. Is there a way to make an calibration application based on the filter
> that does not
> require the graph editor. Some people asked me: "What if I don't have
> the graph editor?"
> The app could look like the tracking or the HMM app.
> Of course, both versions could be kept on the CD.
> 2. It would be good to have a feedback of the reprojection errors.
> Would there be a way to quickly show the error of reprojection (maybe
> in the form
> of an histogram). This question came very often.
> 3. It would be nice to be able to save the calibration images into
> separate files so
> that the user can run other calibration codes on them and to be sure.
> For example, save all the images under:
> calib_ima1.bmp,...,calib_ima43.bmp if there
> are 43 images used for calibration. That would be an option given to
> the user before
> going through the acquisition. Maybe the default setting is "no
> saving", and
> a special setting would be "saving".
> Maybe, it is best if the user is not prompted all the time.
> I would make use of that function for testing purposes.
> This could be joined with an option to save the point coordinates
> (image points
> and 3D points) into separate text files. I have that option in the
> matlab tool.
> 4. In the more long term, we should think of a way to estimate
> uncertainties of
> estimation of focal length and principal point. Is there an easy way to
> get these
> estimates? I am not sure yet, but I will investigate.
> One way may be to run calibration on a number of combinations of
> subsets of images,
> and compute standard deviations... yet, the mean value should be the
> one computed
> based on all the images. Long term stuff, but good to keep in mind...
>
>
>
> Now my own upgrade recommendations (before CVPR):
>
> 1. For fish-eye lens cameras it is useful to extend the distortion model
> to the 6th
> order in radial distortion. I made the modifications in the matlab
> file. Note that
> this is far from being useful in the case of regular cameras.
> Going any further makes absolutely no sense.
> 2. I also thought of adding the skew coefficient for completion purposes
> (the matlab
> code already has it). Of course, it is known that most cameras these
> days have
> zero skew, but that should not affect the rest of the processing
> (given that a lot
> of images are used for calibration).
> Maybe, an option "estimate/do not estimate skew" could be added to the
> application
> so that people have the choice. That choice does make a lot of sense.
> That is really the only variable that may of may not be kept in the
> minimization
> depending on the user.
>
>
>
> What do you think about all this?
>
>
> Final observation: I tested the calibration code on the 3com camera using
> 70 images
> for calibration, and it worked beautifully. I compared the results with
> the matlab code
> and I found very close results in both! (even using different images)
> It is therefore working very well! Good job!
>
>
>
> -Jean-Yves
>
Forwarded with edits by Bradski...
-----Original Message-----
From: Elisha Berns [mailto:EBerns@...]
Sent: Friday, June 16, 2000 4:04 PM
To: 'gary.bradski@...'
Subject:
Dear Dr. Bradski,
I recently saw the press release regarding Intel giving licenses for an open
source library for machine vision methods and algorithms. <snip> I would
like to ask
if you could give a few words on advice regarding what software to use and
which research papers to read to get up to speed in video shot and scene
change detection.
Thanks for any help, and by the way where is the open source on Intel's
site???
Elisha Berns
Senior Software Engineer
eberns@... <mailto:email: eberns@...>
tel: (323) 692-1754
FasTV, Inc.
5670 Wilshire Blvd., Suite 1550
Los Angeles, CA 90036
FasTV.com
The Smart Way To See Your World.
Visit us at www.fastv.com <http://www.fastv.com/>
--- In OpenCV@egroups.com, "Bradski, Gary" <gary.bradski@i...> wrote:
> Forwarded with edits by Bradski...
>
> -----Original Message-----
> From: Elisha Berns [mailto:EBerns@f...]
> Sent: Friday, June 16, 2000 4:04 PM
> To: 'gary.bradski@i...'
> Subject:
>
>
> Dear Dr. Bradski,
>
> I recently saw the press release regarding Intel giving licenses
for an open
> source library for machine vision methods and algorithms. <snip> I
would
> like to ask
> if you could give a few words on advice regarding what software to
use and
> which research papers to read to get up to speed in video shot and
scene
> change detection.
>
See papers by Boon-Lock Yeo. Video shot detection is often done via
histogram comparisions which are well supported in OpenCV.
> Thanks for any help, and by the way where is the open source on
Intel's
> site???
For now,
http://developer.intel.com/software/opensource/cvfl/cvlpage.htm
>
> Elisha Berns
> Senior Software Engineer
>
> eberns@f... <mailto:email: eberns@f...>
> tel: (323) 692-1754
>
> FasTV, Inc.
> 5670 Wilshire Blvd., Suite 1550
> Los Angeles, CA 90036
>
> FasTV.com
> The Smart Way To See Your World.
> Visit us at www.fastv.com <http://www.fastv.com/>
> -----Original Message-----
> From: Christopher R. Wren [mailto:cwren@...]
> Sent: Wednesday, June 21, 2000 10:55 AM
> To: gary.bradski@...; Trevor Darrell
> Subject: RE: OpenCV Bugs
>
>
>
> > added to opencv@egroups.com
>
> Is it possible for me to be added to that list as well?
>
> > Since I'm on NT 4.0, not Win2000 yet, I've only installed
> 6.0, but the SDK
> > should install graphedit under c:\dxmedia\bin
>
> In their infinite wisdom, MSFT moved the DirectX Media SDK out of
> the main DirectX SDK package and into the Platform SDK. graphedt
> is not installed anywhere as far as I can tell.
>
> I'll ping some folks at MSFT and see if I can get an answer to
> this.
>
> > Yes. This might be a glitch since we develop db.
>
> Easy enough to fix, I was just mentioning it as a bug fix for the
> next release.
>
> > > > So the DirectShow examples all filters?
> > ??
>
> Sorry, let me enunciate: it seems that all the executable demos
> are VFW-based, and all the directshow based demos are active-X
> controls that require graphedt to run. I was hoping for an
> example of video acquisition in directShow. the VidCap example
> in the DirectX Media SDK and the ExCamera example in the MSFT
> Vision SDK are both burdened with a very restrictive license.
>
On June 30, our lab will have a website up. I am having my team prepare
aquisition and display templates/stubs code examples that will do this and
will put them up at the site ASAP. Some of them are just getting back from
CVPR, so they might need a few days to get functioning again. I will try to
mail you a zipped code template as soon as I can that does what you want if
I get it before our website goes up, otherwise on the website.
Gary
Hi Daniel,
you will find my answer in red in the following.
Vadim: if I say something wrong, please correct me.
I hope this helps you,
-Jean-Yves Bouguet
> ---------- Forwarded message ----------
> Date: Mon, 19 Jun 2000 08:31:07 -0600
> From: Small, Daniel <desmall@...>
> To: Jean-Yves Bouguet <bouguetj@...>,
> gary.bradski@...
> Subject: RE: CVPR paper
>
>
> Dr. Bouguet, Dr. Bradski,
>
> I hope CVPR went well and that open-cv was well recieved. We are setting
> up
> a volumetric system at Sandia (similar to the one described in your
> paper),
> and I was wondering if you could answer a few questions for me regarding
> your system, and openCV calibration functions in general. We have run
> into
> a couple of snags.
>
> I wrote my own version of calibFilter by using the old alpha2 code as a
> model for how to access the alpha3 64bit functions. It seems to work
> nicely
> to recover the intrinsic parameters. I am using 2.6mm lenses, so I have
> alot
> of distortion. I can use cvUndistort with the recovered parameters and I
> get
> a nicely corrected image.
>
> For my target I have a 6x4 checkerboard w/ 6" squares laminated to a 1"
> thick piece of flat wood.
>
> I tried to use the function cvFindExtrinsic64d function to recover the
> extrinsic parameters in a global coordinate system for 6 cameras. The
> target appears in different sizes in the 6 images, usually occupying about
> 100x100 pixels in a 720x486 size image.
>
> I am getting back values that appear correct in the Z axis, but too small
> in
> X & Y. The angles appear to be in radians. Are they euler angles?
>
>
I believe you are talkign about the rotation component attached to the rigid
body motion
between the calibration pattern and the camera reference frame.
This rotation component is represented by a rotation vector.
No, the coordinates of this vector are not Euler angles.
It turns out that the rotation vector has 3 coordinates (each in radians).
The direction
of the vector is the axis of rotation, and the norm of this vector is the
amplitude
of rotation.
There is a very simple equation relating rotation vectors and rotation
matrices: the rodrigues
formula (also provided in the library).
> Is this a reasonable thing to try with this function?
>
>
yes! There might be some minor bugs in the function, but they should be very
minor.
This function is very extensively used by the main calibration kernel, so
the fact that the calibration engine works shows that the extrinsic
computation
should work too.
There might be a scale issue (the absolute size of the pattern needs to be
fed properly
to the function). We are going to take a close look at that function.
Thank you for the information.
Can I specify 3D points rather than planar points? Will it increase the
accuracy of the extrinsic fit? What methods would you recommend for
multi-camera registration?
Yes! The extrinsic computation should work for 3D points too.
Vadim, am I right?
The initialization step is different (not using homographies, but
SVD), but the final optimization step is identical in both ways (using
gradient
descent).
Yes! Using 3D objects give rise to better accuracies!
I have some code that works fine for static multi-camera registration
(pinhole model) using 6 3D points from the environment. It is based on a
least-squares approximation. Can I use this code with these lenses by
undistorting the image using the cvUndistort function to correct for the
radial distortion. My hope is that I can use the resultant undistorted image
with a simpler pinhole model with the same center pixel & focal length
values that I recovered from using calibFilter.
Yes! Absolutely.
In fact, the model to use once the image is undistorted is a simple pinhole.
But actually, while undistorting, we keep the same principal point, and the
same focal, so
the same other parameters should be used for point normalization.
Thanks for your time,
You are welcome!
If you need any more information, do not hesitate to send us email.
Thank you for your feedback.
Dan Small
-Jean-Yves Bouguet
Yes, all the answers are correct. Rotation vector is translated to rotation matrix using
Rodrigues transform. We fix one minor bug in the transform (which can cause program crash
when calibration function is given ill-conditioned data (very little changes from one frame to another)).
So updated version will work even more stable.
3D points in cvFindExtrinsics64d are handled properly.
Undistortion function keeps principal point and focal unchanged (only second (or upper) order distortion
is removed). BTW, we've found the way how to speed up undistortion significally - some of the next patches
will include it. Also it will remove tangential distortion (without performance loss).
Vadim Pisarevsky.
-----Original Message-----
From: Bouguet, Jean-Yves [mailto:jean-yves.bouguet@...]
Sent: Thursday, June 22, 2000 5:23 AM
To: 'Small.Daniel<desmall@...>'
Cc: 'opencv@egroups.com'
Subject: [OpenCV] Calibration in Open CV - Some information
Hi Daniel,
you will find my answer in red in the following.
Vadim: if I say something wrong, please correct me.
I hope this helps you,
-Jean-Yves Bouguet
> ---------- Forwarded message ----------
> Date: Mon, 19 Jun 2000 08:31:07 -0600
> From: Small, Daniel <desmall@...>
> To: Jean-Yves Bouguet <bouguetj@...>,
> gary.bradski@...
> Subject: RE: CVPR paper
>
>
> Dr. Bouguet, Dr. Bradski,
>
> I hope CVPR went well and that open-cv was well recieved. We are setting
> up
> a volumetric system at Sandia (similar to the one described in your
> paper),
> and I was wondering if you could answer a few questions for me regarding
> your system, and openCV calibration functions in general. We have run
> into
> a couple of snags.
>
> I wrote my own version of calibFilter by using the old alpha2 code as a
> model for how to access the alpha3 64bit functions. It seems to work
> nicely
> to recover the intrinsic parameters. I am using 2.6mm lenses, so I have
> alot
> of distortion. I can use cvUndistort with the recovered parameters and I
> get
> a nicely corrected image.
>
> For my target I have a 6x4 checkerboard w/ 6" squares laminated to a 1"
> thick piece of flat wood.
>
> I tried to use the function cvFindExtrinsic64d function to recover the
> extrinsic parameters in a global coordinate system for 6 cameras. The
> target appears in different sizes in the 6 images, usually occupying about
> 100x100 pixels in a 720x486 size image.
>
> I am getting back values that appear correct in the Z axis, but too small
> in
> X & Y. The angles appear to be in radians. Are they euler angles?
>
>
I believe you are talkign about the rotation component attached to the rigid
body motion
between the calibration pattern and the camera reference frame.
This rotation component is represented by a rotation vector.
No, the coordinates of this vector are not Euler angles.
It turns out that the rotation vector has 3 coordinates (each in radians).
The direction
of the vector is the axis of rotation, and the norm of this vector is the
amplitude
of rotation.
There is a very simple equation relating rotation vectors and rotation
matrices: the rodrigues
formula (also provided in the library).
> Is this a reasonable thing to try with this function?
>
>
yes! There might be some minor bugs in the function, but they should be very
minor.
This function is very extensively used by the main calibration kernel, so
the fact that the calibration engine works shows that the extrinsic
computation
should work too.
There might be a scale issue (the absolute size of the pattern needs to be
fed properly
to the function). We are going to take a close look at that function.
Thank you for the information.
Can I specify 3D points rather than planar points? Will it increase the
accuracy of the extrinsic fit? What methods would you recommend for
multi-camera registration?
Yes! The extrinsic computation should work for 3D points too.
Vadim, am I right?
The initialization step is different (not using homographies, but
SVD), but the final optimization step is identical in both ways (using
gradient
descent).
Yes! Using 3D objects give rise to better accuracies!
I have some code that works fine for static multi-camera registration
(pinhole model) using 6 3D points from the environment. It is based on a
least-squares approximation. Can I use this code with these lenses by
undistorting the image using the cvUndistort function to correct for the
radial distortion. My hope is that I can use the resultant undistorted image
with a simpler pinhole model with the same center pixel & focal length
values that I recovered from using calibFilter.
Yes! Absolutely.
In fact, the model to use once the image is undistorted is a simple pinhole.
But actually, while undistorting, we keep the same principal point, and the
same focal, so
the same other parameters should be used for point normalization.
Thanks for your time,
You are welcome!
If you need any more information, do not hesitate to send us email.
Thank you for your feedback.
Dan Small
-Jean-Yves Bouguet
------------------------------------------------------------------------
SALESFORCE.COM MAKES SOFTWARE OBSOLETE
Secure, online sales force automation with 5 users FREE for 1 year!
http://click.egroups.com/1/2658/12/_/_/_/961636975/ ------------------------------------------------------------------------
To unsubscribe from this group, send an email to:
OpenCV-unsubscribe@egroups.com
Question #1.
Actually, DirectX Media (that includes DirectShow SDK - filter graph editor, headers, libs to compile filters)
is not included into DirectX SDK, but it is also can be downloaded freely from http://microsoft.com/directx/homeuser/downloads/default.asp. So, it is a bug in documentation.
Assume that you install DirectX Media to folder C:\DXMedia.
Also, to compile filters yourself, you have to add paths C:\DXMedia\classes\base and C:\DXMedia\include to the _TOP_ of includes paths in DevStudio (tools->options->directories->include files) and path C:\DXMedia\lib to libraries paths (tools->options->directories->library files).
Question #2.
Yes, we build the library and demos and run all the demos under Win98 (Of cause, DXMedia must be installed as well). If there are problems with compilation or running any demos under Win98, please, report us.
HMMDemo, LkDemo.
They use camera in similar way - via vfw only. We are going to add support of DirectShow and MIL interface in one of the next releases. Both they link with cvlgrfmts and CV. Debug versions link with cvlgrfmtsd.lib and
CVd.lib and release versions link with cvlgrfmts.lib and CV.lib. To build debug version, you have to precompile CV and cvlgrfmts in debug configurations (dependences between projects are not set correctly in this release
:( ). They use first appropriate vfw driver. Standard Windows2000 vfw driver allows to select concrete camera driver, while 3com driver seems to be not engaged into the scheme, so it can't be choosed unless program allows user to select vfw driver - and current versions of HMM and Lk Demos don't do it. If you get black screen
with some camera, try to click video format button on toolbar (it looks like resizing window). Often it is possible to change video format. Currently, demos support RGB24 and I420 formats.
CamShiftDemo.
If it reports that it can't create CamShift filter - it means that the filter is not registered. You can register it together with other filters using RegisterAll.bat batch file). Of cause, you have to have DXMedia installed. Clicking on Camera sing on toolbar runs camera.
VMDemo.
It doesn't use video. To get something from it, open file apps\VMDemo\Media\boy1.ini and start move slider.
DirectShow examples.
All they are filters except CamShiftDemo (which is application that creates filter graph internally and includes CamShift filter there to track face).
Vadim
-----Original Message-----
From: Bradski, Gary [mailto:gary.bradski@...]
Sent: Wednesday, June 21, 2000 6:35 AM
To: 'opencv@egroups.com'
Subject: [OpenCV] FW: OpenCV Bugs
OpenCV team, this is high priority, I will provide my answers, fill in for
me
-- Gary
-----Original Message-----
From: Trevor Darrell [mailto:trevor@...]
Sent: Tuesday, June 20, 2000 11:30 AM
To: gary bradski
Cc: cwren@...; Dana A Levine
Subject: Re: OpenCV
Hi,
Any idea about the following problems chris (and my urops here) have had?
>
>
> Big Question #1: In OpenCV\CVL_html\appPage\doc_calib.html the claim is
made
> that the filter graph editor is installed by DirectX 7.0 SDK. I installed
> the DirectX 7.0a SDK, I can't find graphed.exe anywhere. Where can I get
> it?
>
> Big question #2: Has OpenCV been run on Win98?
>
> HMMDemo uses vfw. Like many projects, it links against cvd and
cvlgrfmtsd,
> but those don't exits (debug versions?). My compiled version crashes.
The
> included binary runs fine. The included binary only allows selecting the
> WDM driver for the Creative camera (not the VFW one) and the Kodak camera
> (no VFW driver as far as I can tell). It only works with the Creative
> camera. Black screen with the Kodak, ignores the 3com completely.
>
> LKDemo uses vfw.
>
> CamShift doesn't do anything for me. It builds fine, but I don't see any
> video. Same for included binary. Don't see any video code in the source.
> Similarly, VMDemo doesn't use video, correct?
>
> So the DirectShow examples all filters?
>
> Chris
------------------------------------------------------------------------
Free, Unlimited Calls Anywhere!
Conference in the whole family on the same call.
Let the fights begin! Visit Firetalk.com - Click below.
http://click.egroups.com/1/5476/9/_/_/_/961554884/ ------------------------------------------------------------------------
To unsubscribe from this group, send an email to:
OpenCV-unsubscribe@egroups.com
Dot product is supported in the cvm matrix functions in the library as
cvmDotProduct. After taking with Radek, he knew this, but doesn't want the
whole library just to get one optimized dot product. There will soon be a
mechanism for extracting the Optimized Binaries of only those functions that
you actually use that will be called something like "UserDLL".
Gary
> -----Original Message-----
> From: Grzeszczuk, Radek [mailto:Radek.Grzeszczuk@...]
> Sent: Thursday, June 22, 2000 2:31 PM
> To: 'opencv@egroups.com'
> Cc: Sukumaran, Srihari
> Subject: [OpenCV] dot product
>
>
>
> Does anybody out there have an efficient implementation of a
> dot product
> optimized for the Intel architecture? Thanks,
>
> Radek
>
> --------------------------------------------------------------
> ----------
> Life's too short to send boring email. Let SuperSig come to
> the rescue.
> http://click.egroups.com/1/5108/12/_/_/_/961709463/
> --------------------------------------------------------------
> ----------
>
> To unsubscribe from this group, send an email to:
> OpenCV-unsubscribe@egroups.com
>
>
>
>
-----Original Message-----
From: Bradski, Gary [mailto:gary.bradski@...]
Sent: Friday, June 23, 2000 3:08 AM
To: 'OpenCV@egroups.com'
Cc: Sukumaran, Srihari
Subject: RE: [OpenCV] dot product
Dot product is supported in the cvm matrix functions in the library as
cvmDotProduct. After taking with Radek, he knew this, but doesn't want the
whole library just to get one optimized dot product. There will soon be a
mechanism for extracting the Optimized Binaries of only those functions that
you actually use that will be called something like "UserDLL".
Gary
> -----Original Message-----
> From: Grzeszczuk, Radek [mailto:Radek.Grzeszczuk@...]
> Sent: Thursday, June 22, 2000 2:31 PM
> To: 'opencv@egroups.com'
> Cc: Sukumaran, Srihari
> Subject: [OpenCV] dot product
>
>
>
> Does anybody out there have an efficient implementation of a
> dot product
> optimized for the Intel architecture? Thanks,
>
> Radek
>
> --------------------------------------------------------------
> ----------
> Life's too short to send boring email. Let SuperSig come to
> the rescue.
> http://click.egroups.com/1/5108/12/_/_/_/961709463/ > --------------------------------------------------------------
> ----------
>
> To unsubscribe from this group, send an email to:
> OpenCV-unsubscribe@egroups.com
>
>
>
>
------------------------------------------------------------------------
Take 20 friends to Vegas on New Year's courtesy of Expedia.com.
Win the airfare, a suite at Bellagio and $15,000. Or win 2 roundtrip
tickets anywhere in the U.S. given away daily. Click for a chance to win.
http://click.egroups.com/1/5294/12/_/_/_/961715280/ ------------------------------------------------------------------------
To unsubscribe from this group, send an email to:
OpenCV-unsubscribe@egroups.com
<Vadim.Pisarevsky@i...> wrote:
> Actually, DirectX Media [...] is not included into DirectX SDK [...]
> from http://microsoft.com/directx/homeuser/downloads/default.asp.
A-ha! Graphedtd.exe at last! Thank you. I have the Platform SDK
installed. That supposedly includes the Media SDK, but it doesn't
include graphedt. The DirectXMedia download on that page
automatically layerd itself over the Platform SDK and added the
graphedt exec.
> Assume that you install DirectX Media to folder C:\DXMedia.
With the Platform SDK installed it ends up in the directory:
C:\Program Files\Microsoft Platform SDK\Bin
and the includes end up next door in classes/base.
Thanks for your help.
Chris
Lonce
Dude, you got this because you didn't get the erratum sheet.
SOURCE OF BUG:
The bug (thanks to Bob Davies): IPL.DLL is a DLL "stub" that looks up the
processor ID and then loads the appropriate optimized DLL. However, it
looks in the system path first, not the local directory first. So, if there
are two copies of IPL and the old one is on the system path, the current
IPL.DLL (called by registering the filter) then ends up trying to load an
old version whose API is different causing the problem. This is a bug in
IPL which the MSL people say they'll fix next rev.
WHAT MESSED YOU UP:
Your problem is that you have two copies of IPL somewhere on your system.
That's
ipl.dll NOT iplib.dll.
FIX:
You either have to get rid of the old ipl.dll, or put the new IPL dll's
(OpenCV\bin\ipl*.dll) in the system path. Then runRegisterAll.bat again.
Gary
> -----Original Message-----
> From: Lonce Wyse [mailto:lwyse@...]
> Sent: Thursday, June 22, 2000 7:30 PM
> To: Bradski, Gary
> Subject: Re: marching tune
>
>
>
> Hi Gary,
>
> I am reporting an installation problem I had with the
> library. During installation, a dialog box popped up
> "Load IPLib error"
> "No IPLib DLL was found in the Waterfall procedure"
>
> (sure enough, there is no such DLL anywhere on my machine)
>
> Hitting the OK button allowed the installation to proceed.
>
> After building the sample filters (eg Kalman) and registering
> them, and then attempting to load them into a filter graph
> editor, the same Dialog box comes up reporting the IPLib problem.
>
> Any ideas?
>
> Thanks,
> - lonce
>
>
>
Robert
No, until June 30th, you can download from
http://developer.intel.com/software/opensource/cvfl/cvlpage.htm
Before running the install, get rid of any old copies of the IPL library if
you have them. OpenCV install copies the current version of IPL in there
and there have been conflicts (...waterfall IPL...) errors. If not, see the
BUG Install I just posted on the OpenCV group.
Gary
> -----Original Message-----
> From: Robert Wagner [mailto:wagner@...]
> Sent: Friday, June 23, 2000 10:52 AM
> To: Bradski, Gary
> Subject: Re: OpenCV
>
>
> "Bradski, Gary" wrote:
>
> > Try again, you should be a member now.
> > Gary
>
> Thanks, I am. It looks like I won't be able to get the
> library until June
> 30th. Is that correct?
>
> Bob
>
> --
> Robert Wagner
> Computer Vision/Computational Neuroscience Lab
> Dept. of Cognitive and Neural Systems
> Boston University
> email: wagner@...
>
>
>
Chris,
Try this. http://developer.intel.com/software/opensource/cvfl/index.htm We
had some trouble with our external web site.
Mark
-----Original Message-----
From: Christopher R. Wren [mailto:cwren@...]
Sent: Saturday, June 24, 2000 8:16 AM
To: OpenCV@egroups.com
Subject: [OpenCV] Re: OpenCV where to download it until June 30th.
--- In OpenCV@egroups.com, "Bradski, Gary" <gary.bradski@i...> wrote:
> http://developer.intel.com/software/opensource/cvfl/cvlpage.htm
that URL gives me a "Not Found" error.
------------------------------------------------------------------------
Get 6 months of FREE* MSN Internet access!
http://click.egroups.com/1/5725/12/_/_/_/961859800/
------------------------------------------------------------------------
To unsubscribe from this group, send an email to:
OpenCV-unsubscribe@egroups.com
Hi Daniel,
The function _cvProjectPoint does project points on your 3D
object onto the image plane (pixel projection), given the
intrinsic parameters (focal, principal point, distortion),
and the extrinsic parameters (position of the object in space).
The deriv* parameters are the Jacaobian matrices of the output
(the pixel projection) with respect to the inputs (intrinsic+extrinsic).
Those are output arguments, not input arguments.
They are used for the calibration procedure itself, more precisely for
the update of the calibration parameters (intrinsic and extrinsic).
It turns out that it is quite convenient to keep everything in a
unique function (computation of the projection, and its derivatives), but
for your application, you may discard the Jacobians.
-JY
-----Original Message-----
From: Small, Daniel [mailto:desmall@...]
Sent: Sunday, June 25, 2000 8:08 AM
To: 'gary.bradski@...'
Cc: 'jean-yves.bouguet@...'
Subject: re: 3d-2d projection
Gary, Jean-Yves,
please correct me if I am wrong. To get calibrated 3D world space to 2D
image plane projectsion, it looks like I can use the function
_cvProjectPoints, with 0 vectors specified for the deriv* parameters at the
end of the arg list. All I am interested in is getting the imagepoints out.
What are those dervi* parameters used for?
Thanks for your time,
Dan Small
Hi Daniel,
This is a very good observation. Thank you for sending this email!
I think I know what is happening.
It looks to me that you are trying to estimate a lot of things with
very little data:
Count the unkowns:
2 for focal
+ 2 for principal point
+ 4 for distortion
+ 6 for 3D position of object in space
---------------------
total = 14 scalar unknowns!
My recommendation: use more than 11 points for estimation, even
if your object is non planar.
Another recommendation: when using so little data, turn off the
estimation of the principal point.
Here, it even looks like you need to turn off the distortion part...
Actually, I looked at your data under matlab, and it looks like you will
not be able to calibrate using this data (at all):
3 reasons:
1 - Too little coverage of your image
2 - Too few points (only 11!!!)
3 - Not enough 3D-ness in your rig (or rather, not even uniform spread in
depth)
I am enclosing a picture of the image reprojection that you are using
(Image_Point.jpg).
There is obviously not enough coverage of the image
I am also enclosing a picture of the 3D points that you are using:
(Object_Points.jpg)
Only one point sticking out of the plane! kind of a weird calibration rig!
I tried to use the matlab engine to calibrate your camera, and it fails also
(as predicted). So, it is no fault of the C code.
Here is my final word: Calibration is not a magical process.
It needs the right data to estimate something.
If you provide no data to the estimator, the estimator will return garbage,
and that
is no fault of the implementation.
Now, take a look at the matlal tutorial that I enclosed on the OpenCV CD,
and
see how many images, points that I am using (20 to 25!)
You may calibrate using less data (3 to 10 images of a planar rig or 2 to 5
of a 3D rig), but remember that if you do not provide enough data, then
nothing
will happen.
So basically: a good coverage of the image plane (to capture distortion
model), and
span as many orientations as possible in space (valid when using planar
rigs).
Also: use more than one image! that is a crucial thing for accurate
calibration!
I hope this helps you,
Good luck Daniel,
-Jean-Yves
I am going to try to calibration using your data using the matlab code
(from whcih the C-code was written from).
-----Original Message-----
From: Small, Daniel [mailto:desmall@...]
Sent: Sunday, June 25, 2000 9:51 AM
To: 'vadim.pisarevsky@...'; 'jean-yves.bouguet@...'
Subject: data I used
Gentlemen,
This is the data that I used to get the previous problem:
11 pts in the image:
479.52 236.08
608.41 415.37
461.00 40.00
451.48 308.70
373.99 314.89
299.32 319.13
231.55 321.37
443.73 282.92
378.36 288.30
314.69 292.74
255.47 296.23
11 points in the world:
ll 0.0 0.0 0.0
lr 54.0 0.0 0.0
ul 0.0 0.0 40.5
d3 27.0 -8.4685 -2.375
d7 27.0 -18.4685 -2.375
d11 27.0 -28.4685 -2.375
d11 27.0 -38.4685 -2.375
d3 17.0 -8.4685 -2.375
d7 17.0 -18.4685 -2.375
d11 17.0 -28.4685 -2.375
d11 17.0 -38.4685 -2.375
internal parameters for the 2.6mm lens (derived from calibFilter)
Focal Length 395.0669 357.1178
Principle Point 380.5387 230.5278
distortion -00.2601 000.0702 -00.0019 -00.0003
Any clues you could give me would be of great help.
Dan
Hi Daniel,
There might be too reasons for your problem:
1- The initial value for the focal length is not good enough, and
the estimation of the initial guess for the rigid pose is then garbage
2- There are too few points in your calibration rig, and then.... no luck
I believe that this is a combinaison of both reasons.
I have observed that behavios in matlab as well.
One thing that you may want to know: Right now, when the calibration rig is
non-planar, the calibration procedure picks a initial guess for the focal
length, instead of estimating the initial guess analytically (this is done
when using planar calibration rigs).
There exists a method for estimating an initial for focal length: The DLT
method:
http://www.kwon3d.com/theory/dlt/dlt.html
This method is not yet implemented in the calibration toolbox, but I will.
I observed however that if you provide good enough 3D calibration data
(quite
generic 3D points nicely spread in space), then a generic initial guess
should work.
Vadim: Is there anything that I am forgetting?
One thing: I will have to look into the gradient descent procedure, but
I observed under matlab that decreasing the step of gradient descent makes
the
convergence procedure more robust with respect to the initial guess.
I believe that the gradient descent procedure takes this into account.
I am wrong Vadim?
-Jean-Yves Bouguet
-----Original Message-----
From: Small, Daniel [mailto:desmall@...]
Sent: Sunday, June 25, 2000 9:38 AM
To: 'vadim.pisarevsky@...'; 'jean-yves.bouguet@...'
Subject: cvFindExtrinsics64d for 3D points?
Vadim, Jean-Yves,
I tried the cvFindExtrinsics64d function with 3D objectpoints and got
garbage numbers (001.#NAN) for answers. I debugged it and found the
following:
at this point in the function:
if( r < 0.0001 )
{/* Test for planarity */
/* Transorm the plane to bring it in the Z=0 plane */
.....
}
I skip to the end of the if clause because my data is not planar (r =
~.341....).
At the end of the if clause, the function copies some data which has garbage
in it, rotVect & transVect. These are the outputs. Do I need to initialize
them or provide an intrinsic guess??
iter = 0;
change = 1.0f;
p_cvCopyVector_64d(rotVect,3,vect_Param);
p_cvCopyVector_64d(transVect,3,vect_Param+3);
Then comes the while loop
while( (change > 0.0000001f) && (iter<100) )
{
}
which fails after one iteration because the value for change is a garbage
value.
Any clues??
Thanks,
Dan
Hi Daniel, Vadim,
Got it! You only care about extrinsics, and the intrinsics are already
computed.
Sorry for the confusion.
You are absolutely right, in this case, yes! This should work!
In fact, it does work!
I just ran it in matlab (with your data), and it works beautifully.
Therefore, it should work using the C functions (given that the C code
is an image of the matlab code).
I am enclosing to that message the entire matlab toolbox that I am using for
that test (for you, and for Vadim),
together with the actual small script file that I created
using your data (small_test_script.m).
In your case, the answer of the extrinsic computation is:
(just for your reference)
om = [1.4226 ; 1.3812 ; -1.2359] ----> rotation vector (not Euler angles)
T = [18.8631 ; 1.5762 ; 74.1250] ----> translation vector
I am also enclosing a figure showing the data points together with the
reprojected points (after reprojection of the structure onto the image plane
---> the difference is really small!!
Vadim: Could you check on this: I am running this on the matlab functions,
and
the test passed, meaning the computation of the extrinsics having intrinsics
known. This should work using the C functions as well.
Thank you very much Daniel for bringing this possible bug to our attention.
This is great!
As for your question regarding Euler angle representation, there is
an easy way to convert. Here it is: use _cvRodrigues to convert between the
rotation vector (om in our previous example) to a rotation matrix (a 3x3
matrix that is unitary, with positive determinant = +1).
Then, convert the matrix into your Eurler representation (I believe that you
must have tools to do that).
I cannot provide you the funciton to do this last conversion, unless you
give me
a recipe for constructing rotation matrices from your Euler representation.
The catch is that there is a very large number of different ways to define
Euler angles transforms.
So, if you give me that last transform: Euler angles -> rotation matrix
then I can give you the entire recipe:
rotation vector <--> rotation matrix <--> Euler angles
Thank you again Daniel,
-Jean-Yves Bouguet
-----Original Message-----
From: Small, Daniel [mailto:desmall@...]
Sent: Monday, June 26, 2000 12:22 PM
To: 'Bouguet, Jean-Yves '; Small, Daniel
Cc: 'vadim.pisarevsky@...'
Subject: RE: [OpenCV] INFO: data needed for calibration
Hi Jean-Yves,
Thanks for responding so quickly. A bit of a clarification:
> There might be too reasons for your problem:
> 1- The initial value for the focal length is not good enough, and
> the estimation of the initial guess for the rigid pose is then garbage
I had already derived the focal-length, principal point, and 4 distortion
parameters (using calibFilter). Unless you see something that I do not, it
appears to me that the only outputs of _cvFindExtrinsicCameraParams_64d are
the rotation and translation vectors and the center-point, focal length and
distortion parameters are inputs that are not modified, estimated, or
recalculated (unless this is done in the jacobian matrices that you told me
about earlier).
> 2- There are too few points in your calibration rig, and then.... no luck
>Count the unkowns:
> 2 for focal
>+ 2 for principal point
>+ 4 for distortion
>+ 6 for 3D position of object in space
>---------------------
>total = 14 scalar unknowns!
Actually, for cvFindExtrinsics, I think it is only 6. Aren't the intrinsics
already known??
I think that you were under the assumption that I was using those 11 points
to derive the intrinsic and extrinsic parameters, but that is not the case.
I was only using those 11 points to find extrinsics. I am not saying that it
should work, because I believe you that the process requires more data
points. I will try using a larger data set.
Can you tell me how much of the image my planar rig needs to cover to do a
planar extrinsic fit using _cvFindExtrinsicCameraParams_64d?? I was
probably only using about 1/3rd of the pixels in X & Y. (Very wide angle
lenses).
What I was able to do was to calibrate extrinsics using our least-squares
method to solve for X,Y,Z and yaw, pitch & roll angles. I used corrected
images (_cvUndistort) using the intrinsic parameters provided by
calibFilter, so what I have now is the extrinsics for a pinhole model
camera. I would like to use _cvProjectPoints to project back to the image
plane, but now I need to convert between our euler angles and the
rotation-vector that you use. Do you know of any easy conversion between
the two? Can I create a rotation matrix out of YPR angles and then use
cvRodrigues??
Thanks for your time,
Dan Small
Elisha
The URL changed on us, go to:
http://developer.intel.com/software/opensource/cvfl/index.htm
Gary
> -----Original Message-----
> From: Elisha Berns [mailto:EBerns@...]
> Sent: Monday, June 26, 2000 2:12 PM
> To: 'gary.bradski@...'
> Subject:
>
>
> Thanks for all the replies to my inquiry. Now when I click on the "I
> Accept" for the free source license I always get a server
> error "Page cannot
> be displayed". So I am still looking for a place to download
> the library.
> I'm behind a firewall here at work. In any case perhaps you
> could send it
> to me or a valid URL to use to get the library and the
> documentation???
>
> Elisha Berns
> Senior Software Engineer
>
> eberns@... <mailto:email: eberns@...>
> tel: (323) 692-1754
>
> FasTV, Inc.
> 5670 Wilshire Blvd., Suite 1550
> Los Angeles, CA 90036
>
> FasTV.com
> The Smart Way To See Your World.
> Visit us at www.fastv.com <http://www.fastv.com/>
>
>
Hi Jean-Yves,
The good news is the matlab version converges:
> In fact, it does work!
The bad news is that the extrinsic translation you found for the camera is
way off. When I measure with an old-fashioned tape-measure, I get the
translation at approximately: [82.0, -10.0, 52.0]
> om = [1.4226 ; 1.3812 ; -1.2359] ----> rotation vector (not Euler
angles)
> T = [18.8631 ; 1.5762 ; 74.1250] ----> translation vector
I am hoping that this resolves itself when we take more calibration data.
What I have found in general with the cvFindExtrinsics function is that you
need to see the grid in a large percentage of the image for it to work.
When the grid is viewed at an increasingly sharper angles, the position that
is returned has increasingly larger errors.
Should I expect this kind of result?
Kristen asks> How do you use the pixel access macros to step through the
whole, gray (1 Channel) image?
[[Vadim, keep this to put into the manual (will need more examples, but this
is a start). Also, for ease of use, there should be a macros for accessing
the pixel instead of having to do *(pp.currline + x)]]
These functions need better documentation. Here's a code example haven't
tested yet...will do
Function that passes in iplImage *image which
//SET UP MOVEMENT MACRO STRUCTURE FOR 8U IMAGE (before loop)
CvPixelPosition8u pp; //pixel position structure for 8U image
cvRect roi;
roi.x = 0; //for the whole image
roi.y = 0;
roi.width = image->width;
roi.height = image->height;
CV_INIT_PIXEL_POS( pp, image->imageData, image->widthStep, roi, 0,
0, CV_ORIGIN_TL);
//LOOP THROUGH IMAGE
for(i=0; i<image->height; i++){
for(j=0; j<image->width; j++){
if((int)(*(pp.currline + pp.x)) == 255){
//access the pixel by: *(pp.currline + pp.x)
} //end if 255
CV_MOVE_RIGHT_WRAP( pp, 1 ); //move internal pointer
right by 1, wrap to start of line at image border
}//end inner for
CV_MOVE_DOWN( pp, 1 ); //Move down to the next scan line
} //outer for