Thread: Help With an Algortihm

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    Help With an Algortihm

    Hey I'm was looking for an algorithmic device to measure the relative density of blackness in an area of a picture. I am using it to model Moiré patterns as a heightmap. These

    http://en.wikipedia.org/wiki/Moir%C3%A9_pattern
    http://www.jstor.org/view/07468342/di020744/02p0043o/0

    I basically am simulating this in a way where I graph the family of curves x^2 + y^2 = nr^2 where n is iterated and forms a collection of concentric circles. I sample this data at every x and y in a region, and the this basically simulates a Moiré patterns created by a checkerboard grid kind of like this figure in the article

    http://www.jstor.org/cgi-bin/jstor/g.../12b.jpg?jstor

    I could not figure out the math for the familys of ellipses and hyperbolas as are described in the article, so I considered the option of using an 'energy function' like those seen in content-aware image resizing to interpret the texture as sort of a height map that is measured by the density or 'amount' of black in the region to determine the height.

    In any case, I was wondering if anyone had any algorithmic device to measure the relative density of blackness in an area of a picture.

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Tonto View Post
    In any case, I was wondering if anyone had any algorithmic device to measure the relative density of blackness in an area of a picture.
    What exactly do you mean by relative density of blackness? It sounds like you are talking about a gradient.

    Gradient was in fact what was used in the final demos of the content-aware image resizer. They used a few more sophisticated measures and didn't find that they performed significantly better.

  3. #3
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Yeah, it definitely uses the gradiant vector in the article, I just um, should I just search that? I'm a little lost, I guess I should just research

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. prim algortihm
    By condorx in forum C Programming
    Replies: 6
    Last Post: 11-15-2003, 08:28 PM