R
R
Rostislav2015-10-10 00:23:45
Python
Rostislav, 2015-10-10 00:23:45

How to crop a subject in an image, getting rid of the white background?

The input data is a set of pictures with objects on a white background. It is necessary to crop the object itself from the white background, and so that after inserting the picture in any place, the space around the object remains transparent. In which direction to dig, what libraries are there (preferably Java, but C ++ or Python is also possible)? Or maybe there are ready-made solutions?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
G
GavriKos, 2015-10-10
Makkall @viogull

ImageMagic will save you. In any form - at least a library, at least that. And there are many languages.

P
Pavel K, 2015-10-10
@PavelK

A bit too much for such simple tasks, but it will allow you to do much more in case something happens: OpenCV .

T
Tlito, 2015-10-10
@tlito

phatch image inspector for Linux tlito.ru/node/145

R
Roman Mirilaczvili, 2015-10-10
@2ord

In the case of a simple color replacement, is it so difficult to walk through the image matrix with a similar check:

if (rgba(i,j) == rgba_color(255,255,255,1) {
  rgba(i,j) = rgba_color(0,0,0,0);
}

V
Vlad M, 2015-10-11
@Vlad__M

Photoshop CS + batch processing.
PS I can make clipping images to order.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question