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: 17)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Batch create images from array edmilner 1 104 Jul 17, 2017 16:41
Last Post: ythgilb
  How to close gimp with batch command? flixe 1 105 Jun 19, 2017 12:29
Last Post: ythgilb
  Need help in running a gui script-fu via command line eyalzek 3 200 Oct 4, 2014 14:05
Last Post: eyalzek
  Color menuitems in script or plugin Barbie 7 348 Sep 29, 2014 10:09
Last Post: ofnuts
  script-fu ok in gimp, not in commad line dominique 3 220 Sep 28, 2014 08:55
Last Post: ofnuts

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS