Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a way to speed this up? Tile matching
#1
description of what i am trying to do

So I have a script right now it's doing this
loop through source image for each tile, copy and paste as pattern (difference mode) over top of tile image.
loop through each tile of a visible copy and look at r,g,b using 
make selection of the tile.
Code:
r, _, _, _, _, _ = pdb.gimp_histogram(comp_layer,HISTOGRAM_RED,0,255)
g, _, _, _, _, _ = pdb.gimp_histogram(comp_layer,HISTOGRAM_GREEN,0,255)
b, _, _, _, _, _ = pdb.gimp_histogram(comp_layer,HISTOGRAM_BLUE,0,255)
look at r+g+b value and pick the tile with lowest sum consider that the best match....
and then compose an image using those best match tiles...
what's taking along time right now is this process of selecting the tile and using gimp_histogram...

Is there anyway i could possibly speed this up?
I can't think of one.
Reply


Messages In This Thread
Is there a way to speed this up? Tile matching - by trandoductin - 01-18-2018, 11:22 PM

Forum Jump: