Help With an Algortihm

This is a discussion on Help With an Algortihm within the C++ Programming forums, part of the General Programming Boards category; Hey I'm was looking for an algorithmic device to measure the relative density of blackness in an area of a ...

  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.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #2
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,274
    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

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21