logo       

Re: PCA - What next!?: msg#01220

lib.opencv

Subject: Re: PCA - What next!?

Just found why it is displaying negative values:
Replace the %d by %f.

Regards, :D
Paramesh.

--- In OpenCV@xxxxxxxxxxxxxxx, Naotoshi Seo <sonots@...> wrote:
>
> Hi, I guess it should be because you did not cast to uchar.
> Rather, I everytime think as why Ipl stores data as char not uchar....
>
> Fadi Chakik wrote:
> > I used the PCA.zip without changing the code.
> >
> > All I did is to add a loop to print the avg values like:
> >
> > for(i=0; i<avg->height; i+=10)
> > {
> > for(j=(avg->widthStep)*i; j<(avg->widthStep)*(i+1);
> > j+=avg->nChannels)
> > {
> > printf("\nAVG: %d, %d, %d\n", avg->imageData[j],
> > avg->imageData[j+1], avg->imageData[j+2]);;
> >
> > }
> > }
> >
> > -Fadi
> >
> > Parameswaran <cegparamesh@...> wrote:
> > No! Average values cannot be negative.
> > There is some problem with your code. I didnt experience a negative
> > value..
> >
> > In order to display the image, you have to normalize the pixel values
> > between 0 and 255, and then store it in a 8 bit image.
> > Only 8 bit images can be displayed correctly in the Highgui window, i
> > suppose..
> >
> > Regards, :D
> > Paramesh.
> >
> > --- In OpenCV@xxxxxxxxxxxxxxx, Fadi Chakik <fadichakik@> wrote:
> > >
> > > in the code inside the PCA.zip file, there is "avg" variable which
> > defines the images 'pixels average.
> > > I tried to print it to see its value, I can see that avg has some
> > negative values.. is that normal!
> > > the images from which "avg" is calculated are all gray levels..
> > that means values of pixels are between 0..255. So the mean of
> > positive values should be positive! why do we find negative values for
> > "avg"? is there any explanation?
> > >
> > > However, in the HIGUI window showing the projection, I get
> > sometimes black images for some of the projection.
> > >
> > > -Fadi
> > >
> > > Parameswaran <cegparamesh@> wrote:
> > > There are many available techniques for face recognition,
which can be
> > > found in the face recognition homepage:
> > > www.face-rec.org
> > >
> > > The simplest and best approach is PCA or eigenfaces approach, which
> > > can be used either to recognize, or to reduce the dimensionality.
> > >
> > > To recognize using the weights, you can use euclidean distance,
> > > Correlation distance, covariance distance, and many other distances
> > > available.
> > >
> > > TO save the bounding rectangle of a face, you have to set the Image
> > > Region of Interest(ROI) and save the image.
> > > After saving, reset the ROI.
> > >
> > > Regards, :D
> > > Paramesh.
> > >
> > > --- In OpenCV@xxxxxxxxxxxxxxx, "kirkl_tamworth" <kirkl_tamworth@>
> > > wrote:
> > > >
> > > > Hi all,
> > > >
> > > > I have successfully compiled the PCA example provided in the
files
> > > > section, which outputs the eigenvalues and such. I have two
queries:
> > > >
> > > > 1. Can you help me with where I go from here to perform face-
> > > > recognition? I have 25 face images ready to use and would greatly
> > > > appreciate some help with completing the Eigenface approach.
> > > >
> > > > 2. I have also managed to incorporate the face detection sample
> > into a
> > > > C# application, but I'm not sure how to extract the face from the
> > > > image, given that I know the bounding rectangle. Is there an
OpenCV
> > > > function that can do this for me?
> > > >
> > > > My first query is much more important than the second and I would
> > > > really, really appreciate some help with this. Thanks.
> > > >
> > > > Kirk
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Change settings: http://www.yahoogroups.com/mygroups, select
> > > Get Emails (get all posts)
> > > Daily Digest (one summary email per day)
> > > Read on the web (read posts on the web only)Or Unsubscribe by
> > mailing OpenCV-unsubscribe@xxxxxxxxxxxxxxx
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > YAHOO! GROUPS LINKS
> > >
> > >
> > > Visit your group "OpenCV" on the web.
> > >
> > > To unsubscribe from this group, send an email to:
> > > OpenCV-unsubscribe@xxxxxxxxxxxxxxx
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service.
> > >
> > >
> > > ---------------------------------
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------
> > > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using
> > Yahoo! Messenger with Voice.
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
> >
> >
> >
> > Change settings: http://www.yahoogroups.com/mygroups, select
> > Get Emails (get all posts)
> > Daily Digest (one summary email per day)
> > Read on the web (read posts on the web only)Or Unsubscribe by
mailing
> > OpenCV-unsubscribe@xxxxxxxxxxxxxxx
> >
> >
> >
> >
> > SPONSORED LINKS
> > Open source software Computer vision
> >
> > ---------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> > Visit your group "OpenCV" on the web.
> >
> > To unsubscribe from this group, send an email to:
> > OpenCV-unsubscribe@xxxxxxxxxxxxxxx
> >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
> >
> >
> > ---------------------------------
> >
> >
> >
> >
> >
> > ---------------------------------
> > New Yahoo! Messenger with Voice. Call regular phones from your PC and
> > save big.
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > Change settings: http://www.yahoogroups.com/mygroups, select
> > Get Emails (get all posts)
> > Daily Digest (one summary email per day)
> > Read on the web (read posts on the web only)Or Unsubscribe by
mailing
> > OpenCV-unsubscribe@xxxxxxxxxxxxxxx
> >
> >
> >
> >
> > SPONSORED LINKS
> > Open source software
> >
<http://groups.yahoo.com/gads?t=ms&k=Open+source+software&w1=Open+source+software&w2=Computer+vision&c=2&s=47&.sig=otrYILVEQ0AH3ZQy9bV3Vw>

> > Computer vision
> >
<http://groups.yahoo.com/gads?t=ms&k=Computer+vision&w1=Open+source+software&w2=Computer+vision&c=2&s=47&.sig=fHht503sktp4aSIlRHnj5w>

> >
> >
> >
> >
------------------------------------------------------------------------
> > YAHOO! GROUPS LINKS
> >
> > * Visit your group "OpenCV
<http://groups.yahoo.com/group/OpenCV>"
> > on the web.
> >
> > * To unsubscribe from this group, send an email to:
> > OpenCV-unsubscribe@xxxxxxxxxxxxxxx
> > <mailto:OpenCV-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> >
> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> >
------------------------------------------------------------------------
> >
>






Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise