Post Reply 

Batch processing script Help

Jun 1, 2014, 18:17
Post: #1
Batch processing script Help
I am requesting help on an image analysis macro. I am not a programmer and could use any help you can afford.
I would like to batch process hundreds of images in a single directory where the tool would analyze two images in a file name series and if something is different, make a copy in another directory. Ideally I would have a threshold adjustment tool that I could adjust.

Example:
Img2 = Img1 – YES, do nothing and move to next batch process
Img3 = Img2 – NO, Make copy of Img3 in new directory and move to next batch process
Img4 = Img3 - YES do nothing and move to next batch process
Etc…
Do anyone have a tool like this or can point me in the right direction.

Thank you,
Jeff
Find all posts by this user
Quote this message in a reply
Jun 1, 2014, 18:44 (This post was last modified: Jun 1, 2014 18:49 by ofnuts.)
Post: #2
RE: Batch processing script Help
Don't use Gimp for this, use ImageMagick's compare. It even has criteria to tell you how different two images are:

http://www.imagemagick.org/Usage/compare/

Once you know what you want (especially which metric & threshold to use) (this would require a few manual runs on test images) producing a script to automate this over all your images is quite easy (at least on a Linux system).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jun 1, 2014, 18:45
Post: #3
RE: Batch processing script Help
(Jun 1, 2014 18:17)jarboe3142 Wrote:  I am requesting help on an image analysis macro. I am not a programmer and could use any help you can afford.
I would like to batch process hundreds of images in a single directory where the tool would analyze two images in a file name series and if something is different, make a copy in another directory. Ideally I would have a threshold adjustment tool that I could adjust.

Example:
Img2 = Img1 – YES, do nothing and move to next batch process
Img3 = Img2 – NO, Make copy of Img3 in new directory and move to next batch process
Img4 = Img3 - YES do nothing and move to next batch process
Etc…
Do anyone have a tool like this or can point me in the right direction.

Thank you,
Jeff

I would say that Gimp is not the tool for this but

It depends what you define as Img2=Img1

If truly identical then a simple MD5 comparison is all you need but more probable is that the images are just similar or the same image in different formats or the same image but different scale.

I have seen bits about this on the ImageMagick forum. Maybe there would be a starting place.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jun 1, 2014, 21:53
Post: #4
RE: Batch processing script Help
As Rich and ofnuts have already said, ImageMagick is the way to go.

I've done something very similar, comparing images from a nest box camera, and wrote a Python script that uses ImageMagick, which runs quite happily on Windows XP.

I've attached it if it's any use as a starting point.

Kevin


Attached File(s)
.zip  compare_gui.zip (Size: 1.65 KB / Downloads: 22)
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Request for script chlebna 1 172 Sep 13, 2017 09:35
Last Post: ythgilb
  Request for script - Guillotine + Watermark sunslick 1 230 Sep 4, 2017 08:51
Last Post: ythgilb
  Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer Bertholomäus 2 231 Aug 31, 2017 14:32
Last Post: Bertholomäus
  How to modify this script-fu? Zakary81 1 196 Aug 23, 2017 12:48
Last Post: paynekj
  Batch create images from array edmilner 1 288 Jul 17, 2017 16:41
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS