I
I
Iriney Kalachev2019-01-14 16:11:51
Image processing
Iriney Kalachev, 2019-01-14 16:11:51

How to crop multiple images by content?

There are hundreds of photographs of filed documents. You need to crop them according to the content so as to remove the non-uniform background (table) and the adjacent page. Prompt ready-made software to solve the problem.
5c3c843728507991788887.jpeg
Now the task is partially solved through the ImBatch software for batch processing. There is an Autocrop function by background color - the color and tolerance (threshold) are set with an eyedropper. The result often turns out to be so-so, either too little or too much is cut off (if a large threshold is set). You still have to crop most of the photos manually.
We need software that would dance not from the background, but from the opposite - it would determine the light quadrangle in the center of the photo and crop everything around.
In similar questions I see references to OpenCV, but I have no idea how to use it in practice (minimum programming experience). If there is no ready-made software, then how much can it cost to develop a solution using OpenCV?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
KateCabbage, 2020-11-01
@irinei

In the latest versions of ImBatch, AutoCrop has the ability to Crop by Contours, perhaps it will do. I think this is where OpenCV is used.

N
Neron, 2019-01-14
Lordov @Nekto_Habr

People in such situations like to advise ImageMagik. I haven't tried it myself, but they say it's a very useful tool

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question