It is currently 20 Feb 2018, 05:37

GIMP/GL InterestsTile matching - an idea for a script (Showcase | Slideshow)

GIMP or GIMP LEARN Forum Interests
Post Reply
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 2/2
Posts: 2162
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,946.37 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1207
x 256
Contact:
Canada

Tile matching - an idea for a script

Post#1 by tim » 18 Jan 2018, 21:20


Idea is outlined as below so I can try to script it:

Inputs:
(a) Given a source image.
(b) Select an image to use as tiles.
(c) Enter tile dimensions.

Actions:
1. Divide source image into tiles of given dimensions (c). Divide tile image (b) into tiles of given dimensions (c).
2. For each source tile, compare it to all tile image tiles, select the tile with the least difference from tile image tile.
3. Compose the piece and see what the outcome looks like.

Basically, compose the source image using only tiles from the Tile image with the least difference.

I am curious to see what the result looks like and it'd be very painful to do this manually so the only way of seeing what it looks like quick is to try writing a script for it.

Script coming soon! :bull_riding:
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 2/2
Posts: 2162
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,946.37 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1207
x 256
Contact:
Canada

Post#2 by tim » 18 Jan 2018, 22:54


Test run:
mona_lisa.png
source image mona lisa
mona_lisa.png # (746.31 KiB) Viewed 51 times (Watermarked | Thumbnail)
seeds.png
tile image seeds
seeds.png # (265.43 KiB) Viewed 51 times (Watermarked | Thumbnail)
tile_match_result_50x50.png
mona_lisa_tile_match_50x50
tile_match_result_50x50.png # (282.1 KiB) Viewed 51 times (Watermarked | Thumbnail)
If you squint really hard you kind'a see mona lisa in the result. But I'll try with smaller tiles maybe result will be more interesting....
One problem ... script is extremely slow when running with smaller tile dimension. :off_to_bed_purple:
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

User avatar leopardo-40 (1), User avatar Pat625 (1), User avatar tim (9), User avatar gnerd (1), User avatar Conbagui (1)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Issabella
2: Pat625
3: Pat625
4: Pat625
5: animicule
6: tim
7: gnerd

Who is online

Users browsing this forum: No registered users and 2 guests