1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A Can you generate an image to fit the following features?

  1. Feb 3, 2017 #1
    Currently I am generating an ID from an image by using K-Means to seperate brightness levels into 8 levels (clusters) and order them brightest to darkest. For each cluster I calculate:
    1) Their center points as a percentage of image size (using average pixel coordinates)
    2) Average distance of points from the center as a percentage of image size
    3) Angle between horizontal axis and the line along which the distribution is the highest
    4) Percentage of total area occupied

    ID example (a total of 8 entries in each list (entry per cluster)):
    Centers = [24%, 77%], [56%, 29%], [58%, 87%], ...
    Average distance of point from center of cluster = 12%, 17%, 9%, 30%,...
    Angle between horizontal axis and the highest distribution line (0 to 180 i.e. non-directional) = 55, 10, 155,...
    Area occupied = 7%, 16%, 10%,...

    For my purposes it should not be possible to generate an image with the same ID by using the original image ID. But would it be possible to do that? I'm only asking about feasibility of creating an image to fit that criteria, not necessarily how you'd do it.

    Please ask if anything is unclear - I do feel like the question can be confusing. Thanks for your time,
    Povilas

    P.S. Sorry if I posted in the wrong sub-forum, I was not sure where I should ask this.
     
  2. jcsd
  3. Feb 3, 2017 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    I don't understand how your clustering works, but I don't see why it should be difficult to make a new picture that satisfies your criteria for the clusters. Your values basically describe the rough shape, and then you need some fine-tuning to get the clusters right.
     
  4. Feb 3, 2017 #3
    Thanks for the quick reply, mfb.

    To elaborate on why, in my eyes, the task would be difficult, I have processed a small image with the criteria visually represented (which you can see here). The eight gray shades each represent a cluster. The white bordered circles are their centers. Lines leaving the centers go along highest distribution (angle might be imprecise - still working on the algorithm) and their length indicates average point distance from the centre. Finally, colour inside of lines indicates to which cluster they belong.

    I believe the complexion would come from having to distribute the 8 clusters so that all the criteria for each one of the clusters is met at the same time. As the clusters are detailed and intertwined (not just blobs), I imagined it would be a problem with huge time complexity. What are your thoughts?

    Thanks again :)
     
  5. Feb 3, 2017 #4

    berkeman

    User Avatar

    Staff: Mentor

    Interesting image... What was the base image of?
     
  6. Feb 3, 2017 #5
    The base image was a new type of hologram (as in security sticker type, not the 3d image type) that can have various random patters on it, sometimes resembling landscape. I'm not sure which one I used for this one (I have quite a few) so I can't give you an original image.
     
  7. Feb 3, 2017 #6

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    All the parameters are smooth if you change individual pixels, unless the clustering algorithm does something weird (but I guess you can make an artificial image where the clustering result is well controlled). This is an optimization process in 32 dimensions, with thousands of pixels you can manipulate to slowly approach the right solution. If you want exact results it could be very challenging.
     
  8. Feb 3, 2017 #7
    Thank you so much! That is very useful info :)

    One last thing I'd like to ask: do you think it would be possible to create an algorithm to do this faster? The reason I posted in a maths forum in the first place is to really see how robust it might be - maybe someone will find a way. As long as it's very challenging it should be fine - somebody doing this for individual cases at relatively high cost would be fine. What I'm really looking out for is some way to do this fast and in big batches - that may force me to come up with a whole new way of doing things.
     
  9. Feb 3, 2017 #8

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    If you just want some one-way function for an image, what is wrong with good old SHA-2?
    Easy to implement, easy to calculate, and certainly hard to reverse.
     
  10. Feb 4, 2017 #9
    The picture of the tag would be taken multiple times and it needs to be able to tell if it's the same tag. Because there will be minor imprecisions when taking separate photos, SHA-2 would not do it, as it would generate a completely different key for the images. A bit of error should be tolerable.
     
  11. Feb 4, 2017 #10

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    Ah, so you don't want to consider small differences.

    Then faking an image will be easy. Sure, you have to sit down and analyze what is going on, write an image reconstruction algorithm and so on, but it is certainly possible for someone interested in it.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Can you generate an image to fit the following features?
  1. Can you proof (Replies: 7)

  2. Can you find 0! (Replies: 4)

  3. Can you draw? (Replies: 11)

Loading...