Remove green background
Re: Remove green background
I used the -b white and the commands shown in your example, I actually believe it doesn't work properly on my side.
There's an example photo : http://image.noelshack.com/fichiers/201 ... cn1299.jpg ( too large for this website )
There's an example photo : http://image.noelshack.com/fichiers/201 ... cn1299.jpg ( too large for this website )
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove green background
I want your input, so I can try to process it. This forum does not permit image upload. You have to upload elsewhere and put the URL here as you have done.
Re: Remove green background
Yeah, I don't know what happened with my brain, I wanted to give you the original but...
There it is : http://image.noelshack.com/fichiers/201 ... cn1299.jpg
There it is : http://image.noelshack.com/fichiers/201 ... cn1299.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove green background
What you saw as gray was the transparent regions.
Here is what I get:
Input:
White background:
Default Transparent background (which looks gray if viewed by itself):
Here is what I get:
Input:
White background:
Code: Select all
greenscreen -b white 1556907464-dscn1299.jpg 1556907464-dscn1299_result.jpg
Default Transparent background (which looks gray if viewed by itself):
Code: Select all
greenscreen 1556907464-dscn1299.jpg 1556907464-dscn1299_result.png
or
greenscreen -b none 1556907464-dscn1299.jpg 1556907464-dscn1299_result.png
Re: Remove green background
Yeah, so it doesn't work on my server, I can't tell why, I either have a fully white picture or this if I switch << -b white >> to << -b none >> :
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove green background
What is your Imagemagick version and date of the version and platform/OS?
If on IM 6, then
or if IM 7, then
A guess is that your server is too old for the connected components processing. I can make a version that does not use that, if we find that is the case.
If on IM 6, then
Code: Select all
convert -version
Code: Select all
magick -version
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove green background
Download the script again. I made a change and use -a 0. That will disable the connected components part of the script.
Code: Select all
greenscreen -a 0 -b none 1556907464-dscn1299.jpg 1556907464-dscn1299_result.png
or
greenscreen -a 0 -b white 1556907464-dscn1299.jpg 1556907464-dscn1299_result.jpg
Re: Remove green background
I can't tell which version is installed on my server but I updated your script and did that << greenscreen -a 0 -b white >> and there's no change on the image.
Edit: It works now with << greenscreen -t 22 -a 0 -b white >>. I need to try this more but it looks fine for at least one image.
https://paste2.org/ULmNC4Kh
Edit: It works now with << greenscreen -t 22 -a 0 -b white >>. I need to try this more but it looks fine for at least one image.
https://paste2.org/ULmNC4Kh
- Attachments
-
- sdfsdfsdfs.png (49.84 KiB) Viewed 115590 times
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Remove green background
Your version 6.8.9.9 is prior to -connected-components. I would suggest that you upgrade if possible. That version is about 140 versions old.