S
S
Sharov Dmitry2016-12-09 10:34:25
PHP
Sharov Dmitry, 2016-12-09 10:34:25

How to remove the white background along the contour with GD?

It is necessary to cut off the white background on the layout of the building. There are a lot of images, so doing in Photoshop is not an option. I just can’t get around the contour of the image, it turns out just like this:
310701bea0fa4c0fbbbfbeca116e9cbc.png
The original is like this,
5f285fceb9c14f54a5ea8b5ce196763e.jpg
there are more complicated options with all sorts of dotted lines
8961a1f1c2e646f6a72326fbe2561347.jpg
Help solve this problem. On the server only GD, Imageck is not available.
So far I've created the following
sandbox.onlinephpfunctions.com/code/3066bf1757e5fc...
UPD: dimensions can also be removed from the image

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2016-12-17
@2ord

I don't think this is possible with GD. But with OpenCV - it is quite possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question