0

I'm looking for an offline image processing software that let me edit pictures in a semi-industrial way.

Each picture need to be processed individually (not batch), but the current process is very time consuming and I need to speed it up. I currently process a few pictures a week (5 to 10), and have done about 500 so far.

The images are those of spare parts. They must be improved enough to have a good appearance on marketplaces, but the quality of an art photography is not required. Speed is decisive.

My pictures are captured 90% of time with a flat bed scanner and 10% of time with a smartphone.

95% of the objects have a rectangular shape. However, because they are not perfectly aligned when scanned, image rotation to a custom angle (often < 1 degree) is necessary.

The functionalities that I need are:

  1. (auto-)detect the edges of the objet (rectangular if scanned, or slighlty trapezoidal if the photo was shot with a smartphone)
  2. (auto-)rotate the rectangular object so that its edges become horizontal / vertical
  3. (auto-crop) the object
  4. automatic color correction, followed by manual color adjustment
  5. reduce local overexposure / excessive reflection on metal parts (especially when the picture was shot with a smartphone)
  6. perspective correction (in case the picture was shot with a smartphone)
  7. color depth reduction (256 colors, 16 colors)
  8. save as PNG

Currently, I'm doing 95% of this time consuming job with Irfanview. The current process is as follows:

  1. No solution to auto-detect the object. I could burn the backgound with Bonanza's background burner, but this would be time consuming.
  2. I apply a custom rotation to the image using Irfanview. The angle is chosen on an empirical manner, often doing several attempts.
  3. I crop the image to the object by manually dragging a rectangular area in Irfanview and then applying cut/paste (Ctrl+X / Ctrl+V). Autocropping could be done in Gimp, but opening the picture in it would be more time consuming.
  4. Automatic color correction and manual color correction are done in Irfanview. This can be time consuming if the item was underexposed, especially when the light came from neon tubes.
  5. Correction of undesired local excessive reflections on metal parts is most of the time not done. I can do some copy-paste of neighbouring areas in Paint or Gimp, but this is very time consuming. I'm looking for a "one click"-like solution to to this, possibly locally smoothing in a very fast manner.
  6. Perspective correction is currently done with the free "PerspectiveImageCorrection" software by Wolfgang Schroeder. It is difficult to select the object corners with precision but basically the tool does the job. However I'm still looking for a was to speed up this step.
  7. color depth reduction (256 colors, 16 colors) is done with Irfanview.
  8. save as PNG is done with Irfanview.

The kind of software that I'm looking at would be more automatic, with clickable buttons to apply the steps and more automation (auto-detect objet, auto-rotate object, auto-crop object, ...). Possibly some easily customizable software.

Performing all above step in one lightweight offline software that is designed for industrial and marketplace needs would be perfect. I'm mostly using Windows (but also have Linux and Mac).

All ideas to improve the process are welcome, even if several softwares are required.

0

The software combination that you need is OpenCV and Python, (with a few libraries such as Pillow).

This article shows you how to use OpenCV and edge detection to calculate the transformation needed for both rotational & trapezoid correction of the image. Cropping to a fixed amount outside of the boundary of the detected object is a simple step. Colour correction is a little trickier unless you include a colour reference in each original image, (probably simple enough on new images), but can be done within Pillow as can colour reduction and conversion to PNG. One trick to try to reduce the glare is to convert the image from RGB to HSV and then push the saturation up to 255, (100%), but a lot depends on your original images.

You may need to experiment a bit but should be able to get to the point where >95% of your images can be processed automatically.

With a little bit of work you should be able to show the results of processing and, if unhappy open the image at any stage of processing in GIMP or some other software, (say after perspective correction but before the rest), and then automatically perform the remaining operations automatically.

All of the software mentioned above is:

  • Free, (Gratis), & Open Source
  • Cross Platform (can run on Linux, Windows, OS-X, Raspberry Pi and many others).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.