Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Image Analysis?

Name: Anonymous 2008-05-02 0:10

Sup /prog/

I have a problem whereby I need to identify (with any degree of accuracy) whether or not an image is a resized version of another image. ``Resize'' is defined as a constant aspect-ratio downscale with (hopefully) a cubic sampling. I haven't been able to turn up any reasonable material on image analysis, which means I'm left to my own devices.

I think one viable option might be to consider the proportions of colors within the image. A ``color'', for my purposes, is defined as a set of three ranges (one range for each RGB channel). The algorithm would essentially go through each pixel, keeping a tally of how many of each color there are, then sort by occurance. Two images with similar proportions of the top 5 colors or so are flagged as identical.

The colors would necessarily be ranges because of the cubic sampling -- since one of the images is a downscaled version of another, the set of colors from the two images won't be the same. A pathological example: a large image consisting of alternating white and black pixels gets downscaled, the resultant image has gray -- a color which was not present in the original image.

I had some other weird ideas, like taking the diagonals, downscale one at runtime to fit the other, then compare the deltas.

I dunno. Anyone have ideas/suggestions/links?

Name: Anonymous 2008-05-02 19:54

>>40
IHBT

Name: Anonymous 2008-05-02 20:38

This is the most programming-related thread I've ever seen on /prog/

Name: Anonymous 2008-05-02 20:45

>>42
Which is why I suspect someone copied it from another forum.

>>39
By your logic, no one cares about the code in this thread because it exists.

Name: Anonymous 2008-05-02 20:51

>>43
Sorry, but i'm not letting you to troll me. YHL. HAND

Name: Anonymous 2008-05-03 3:58

>>43
Meh, I think there's plenty of intelligent people on /prog/ who can and will talk about programming-related subjects. The problem is that people rarely start intelligence-provoking threads; the majority of the threads are just shit. And shit breeds shit.

I've always felt that, if a question is phrased in a thought-provoking manner or is a new, interesting question, /prog/ will respond accordingly. If you look at it empirically, most people who ask questions in the OP get their questions answered, albeit with a lot of extra noise mixed in.

Anyway, I don't know what the fuck I'm blabbering about. hax my anus.

Name: Anonymous 2008-05-03 13:02

>>45
Speaking of noise, I'm still looking for a programmer forum where the noise is filtered out. No luck so far. The places with ranking (reddit, slashdot, digg, etc.) are still very noisy, but at least you can search on user names for people you like. Same for comp.lang.* newsgroups.

As for /prog/, all I can come up with is regular expression filtering, similar to email spam filtering.

For example, save this thread to TEXTFILE with wget, then
cat TEXTFILE | awf -f SAMPLEFILTER.awk
where


SAMPLEFILTER.awk=
/^<blockquote>/ {
   #Starting a post. Clear flags.
   BUF = $0
   FAIL=0
   }

/[hH][aA][xX] [mM][yY] [aA][nN][uU][sS]/ {
   #Failure detected.
   FAIL=1 }

{ #Accumulate line in buffer to print later.
  BUF = BUF $0
  }

/^<\/blockquote>/ {
   #Ending a post. Dump what we found.
   print "\n\n\n"
   if (FAIL == 1) {
      print "STUPID"
      }
   else {
      print "POSSIBLY NOT STUPID"
      }
   print BUF
   }


Name: Anonymous 2008-05-03 13:10

Correction

   cat TEXTFILE | awf -f SAMPLEFILTER.awk
                    ^typo

should be
   cat TEXTFILE | awk -f SAMPLEFILTER.awk
              

Name: Anonymous 2008-05-04 18:14

>>46
at least you can search on user names for people you like
Get the fuck off my 4chan

Name: Anonymous 2008-05-04 21:29

>>48
I do so increasingly.
Enjoy your unsorted, unsearchable 99.5% crap.

Name: Anonymous 2010-12-28 2:20

Name: Sgt.Kabukimanҟ 2012-05-23 4:35

迋䋻뙬ﱖ㉏핾쵟੹㯬

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List