Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Object Recognition

  1. Mar 4, 2008 #1
    Hello all.

    I've been given an assignment at Uni but I only have 10 days to do it, and I know very little about the subject, so I'm after some advice and/or suggestions of tutorials/guides that may help me.

    The task is:
    "The purpose of this assignment is to implement an appearance-based program in C/C++ to recognise an object based on a learnt model of the appearnce of the object"
    "The minimal requirement is to construct an eigenspace representation of a set of sampled images of an object, and use this subsapce to perform object recognition"

    We get additional marks depending on the complexity of the program, e.g. using multiple objects, using SVD, robust statistics etc. However I'm not really fussed about this at this stage.

    So far I've loaded the test images in (using C btw), and calculated the average image of all the input images. But now I'm not really sure what to do. I've read about a covariance matrix and I think that is the next step but I'm not sure what I do with it. I'm also unsure as to the part eigenimages, eigenspaces and eigenvectors play in the whole recognition process.

    Any advice?
    Thanks very much.
  2. jcsd
  3. Mar 4, 2008 #2
    hi. Suppose you know some solution, represented by a matrix, A, which also can be written as rA, such that f(i) = rA. Eigenvectors are accorded A. Eigenspace is f(). Eigen values are r.

    How it works?

    For example, the space of f() can be vertical trace lines, or warning signals on screens/captured as images. Perhaps you can solve it for black and white interlaced and set the solution up in the matrix A.

    Assume, Jobs, sends out those trace lines twice the size as Gates does! You may find f(Gates) to be r1A from your solution A, whereas f(Jobs) would be 2r1A.

    Next you recieve screen images then communicate: "Gates is sending out warnings"...

    for your purposes
    perhaps you can do something with smiling!
    Last edited: Mar 4, 2008
  4. Mar 5, 2008 #3


    User Avatar

    In www.codeproject.com , there some snippet about "face detection", these codes were in C#, but I think it do help you!
  5. Mar 7, 2008 #4
    Thanks for the help so far guys. I'm still a little unsure of it all though. I went and saw the lecturer today but unfortunately he was just leaving so I only got chance to speak to him briefly.

    I told him what I had done (load input images, calculate average image, subtract average image from all input images, store all images in one array (A)). He said that was right so far, and the next step is to use Singular Value Decomposition (SVD) on this array (A). After SVD I use the values and measure something or other that I cant quite remember. Unfortunately I couldn't clarify what he meant because as I said he was leaving.

    He has provided us with some code that can do part of the SVD, so I'm not too worried about the actual coding of the solution, its more the theory behind it. Can anyone explain why SVD is used and how the results are used in the recognition process?

    Thanks again.
  6. Mar 7, 2008 #5
    SVD is computable, and any matrix A, can be represented using this scheme.

    Will you measure the Energy of the images?
  7. Mar 7, 2008 #6
    Thanks basePARTICLE. I've had a look through my notes and I can't see energy mentioned anywhere? What do you mean by the image's energy?

    And I'm not tied down to any particular method or technique by the way.
  8. Mar 8, 2008 #7
    check out Viola-Jones algorithm
  9. Mar 8, 2008 #8
    The energy of an image, is described here, but be careful with the notation, because the writer uses an I matrix to represent Image matricies, rather than the Identity matrix.

    Are you using Matlab?
  10. Mar 8, 2008 #9
    No, we have to use C.
  11. Mar 11, 2008 #10
    I had another chat with him today and he suggests to go the SVD route, I've had a look over it and I'm starting to get the idea. I have one really dumb question though. The SVD is represented as:

    Amn = Umm Smn V*nn (*=transpose)

    Where m = number of images (e.g. 30) and n = image size (e.g. 128x128 =16384).

    Am I right in thinking that the SVD equation expects A to be a 2D array in the form arrayA=[30][16384], and the values of m and n in the function header will be 128x128 in this example?

    The SVD implementation I am using is this:
  12. Mar 13, 2008 #11
    Well I've now got SVD working so I have my list of eigenvectors and eigenvalues. The last step is projecting it onto an eigenspace, then putting the image we want to recognise onto this eigenspace and measure the difference between something using the Euclidean distance. However, I'm not sure what we are actually measuring.

    Can anyone help me on this final step?!

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Object Recognition
  1. Pattern Recognition (Replies: 1)

  2. Speech recognition (Replies: 2)