Post Reply 

Click on color and mass change

Jul 1, 2013, 17:19
Post: #1
Click on color and mass change
I have a photo of a very complex, irregular floral painting with a background that has various shades of black and grey.

I want to click on any part of the photo, get Gimp to mass change that color code to black. The reasoning is that eventually, I will end up with a perfectly black background.

Various Gimp tools that rely on tracing a line of some sort with the cursor are not usable due to the extreme complexity of the pattern in the photo.

Is this kind of simple hexadecimal point and mass change possible in Gimp?
Find all posts by this user
Quote this message in a reply
Jul 1, 2013, 18:20
Post: #2
RE: Click on color and mass change
(Jul 1, 2013 17:44)ofnuts Wrote:  You can select by color with a very low threshold and then bucket-fill the selection with another shade of gray/black. But this is just answering your question and I'm pretty sure that this isn't the right way to do what you want. Care to share with us the image (or part of it)?

Selecting is not an option due to the extreme complexity of the boundary between foreground and background.

Mass change is the only logical solution. A hex text editor would do the job but it would be very tedious.

The photo of the painting is attached.
Find all posts by this user
Quote this message in a reply
Jul 1, 2013, 19:18
Post: #3
RE: Click on color and mass change
(Jul 1, 2013 18:55)ofnuts Wrote:  If you use 'select by color' with a low threshold you only have to click on one pixel with the right color to select all the others.

No picture attached... after "Browse..." to select the file you have to use "Add attachment" on t he right to upload it.

The attachment uploads but then does not register. Is 4.1 MB too big?
Find all posts by this user
Quote this message in a reply
Jul 1, 2013, 19:43
Post: #4
RE: Click on color and mass change
(Jul 1, 2013 19:31)ofnuts Wrote:  Possibly.... Crop it to something small enough but still representative. Aim for <500KB.

Cropping to that small size will not be representative. Can I email it to you personally?
Find all posts by this user
Quote this message in a reply
Jul 2, 2013, 00:18 (This post was last modified: Jul 2, 2013 00:22 by iForStyle007.)
Post: #5
RE: Click on color and mass change
(Jul 1, 2013 19:43)peterzay Wrote:  
(Jul 1, 2013 19:31)ofnuts Wrote:  Possibly.... Crop it to something small enough but still representative. Aim for <500KB.

Cropping to that small size will not be representative. Can I email it to you personally?

Changing image size(res) is another viable option, 4mb is rather large for sample picture.
I recommend 1024width(constrain proportions), 800w(best for size vs quality), or 640w(if file size is still >300k)
Go to Image > Image Scale...
Click the link icon to lock px proportions, and type 800 in the width
Set the interpolation: "Cubic(faster)" or "Sinc (Lanczos 3)" (less blur but maybe slower)
-click ok
then save as jpeg (File> Export)
-Make the interplation 1 step under "Best" quality: 90 or 87
-check on/off the preview to see how it changes, if it doesn't change, bring it down a little more to reduce the file size(maybe 65)
Then you could attach it here.

This way you can see how we'd select it, then apply it to your orignal full-quality(resolution) image on your computer. Smile

I have been recently testing the intelligent-scissors select tool and I like how it works and would love to test it with your floral picture!!
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 2, 2013, 01:50
Post: #6
RE: Click on color and mass change
(Jul 2, 2013 00:18)iForStyle007 Wrote:  
(Jul 1, 2013 19:43)peterzay Wrote:  
(Jul 1, 2013 19:31)ofnuts Wrote:  Possibly.... Crop it to something small enough but still representative. Aim for <500KB.

Cropping to that small size will not be representative. Can I email it to you personally?

Changing image size(res) is another viable option, 4mb is rather large for sample picture.
I recommend 1024width(constrain proportions), 800w(best for size vs quality), or 640w(if file size is still >300k)
Go to Image > Image Scale...
Click the link icon to lock px proportions, and type 800 in the width
Set the interpolation: "Cubic(faster)" or "Sinc (Lanczos 3)" (less blur but maybe slower)
-click ok
then save as jpeg (File> Export)
-Make the interplation 1 step under "Best" quality: 90 or 87
-check on/off the preview to see how it changes, if it doesn't change, bring it down a little more to reduce the file size(maybe 65)
Then you could attach it here.

This way you can see how we'd select it, then apply it to your orignal full-quality(resolution) image on your computer. Smile

I have been recently testing the intelligent-scissors select tool and I like how it works and would love to test it with your floral picture!!

Please see attached.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Jul 2, 2013, 08:45
Post: #7
RE: Click on color and mass change
I don't think there is any sure-fire quick way with that image.

Try pulling down the background with the curves tool.
Then it is a fuzzy select & cut.
After that it gets down to pixel levels. Maybe the clone tool (in aligned mode) with a small brush and clone from layer to layer to fill in the gaps.

[Image: XF9GRCg.jpg]

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jul 2, 2013, 13:13
Post: #8
RE: Click on color and mass change
(Jul 2, 2013 08:45)rich2005 Wrote:  I don't think there is any sure-fire quick way with that image.

Try pulling down the background with the curves tool.
Then it is a fuzzy select & cut.
After that it gets down to pixel levels. Maybe the clone tool (in aligned mode) with a small brush and clone from layer to layer to fill in the gaps.

[Image: XF9GRCg.jpg]

Note the loss of detail at the centre of the left floral cluster. Also, the artist's signature at bottom right has almost disappeared. Neat technology exercise, but not ready for publication.

Most of the noise in the background is reflected light. Some is due to the age and condition of the work.

The more I see from you experts on this post, the more convinced I am of the necessity to redo the photo shoot with polarizing filters.

Thanks for your time.
Find all posts by this user
Quote this message in a reply
Jul 2, 2013, 13:40 (This post was last modified: Jul 2, 2013 13:42 by rich2005.)
Post: #9
RE: Click on color and mass change
(Jul 2, 2013 13:13)peterzay Wrote:  
(Jul 2, 2013 08:45)rich2005 Wrote:  I don't think there is any sure-fire quick way with that image.
After that it gets down to pixel levels. Maybe the clone tool (in aligned mode) with a small brush and clone from layer to layer to fill in the gaps.

Note the loss of detail at the centre of the left floral cluster. Also, the artist's signature at bottom right has almost disappeared. Neat technology exercise, but not ready for publication.
..snip...

Thanks for your time.

You must be a child of micro$oft, wave the mouse pointer around, click, and all is fixed.

It is not like that, notice I said "After that it gets down to pixel levels". A layer mask with some time and patience will do it.
or
There are commercial companies (often in India where time and cost are not so much of a concern) which will produce an Abobe PS 'clipping path' for a fee.

Of course then you will have to get a copy of PS which will cost. Rental now starts at something like $20-$30 a month.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jul 3, 2013, 07:41 (This post was last modified: Jul 3, 2013 07:44 by iForStyle007.)
Post: #10
RE: Click on color and mass change
(Jul 2, 2013 07:34)ofnuts Wrote:  IForStyle007 soon to be renamed EdwardScissorHands Smile

Hahaha, good one ofnuts, you crack me up! Funny movie if a bit scary,
I don't know if I'd let him cut my hair XD

I'm back with 2 mini-tutorials and pictures and rich2005 is right, there is no real one-click way to get the background with a photo like that.

*BUT! If you can reshoot the pictures, you'll save yourself a few steps and it will almost be like a 1-click fix to get a solid background color.
So after redoing photoshoot(if you decide to), try the below tutorials too if you need.

_ _ _ _ _ _ _ _
The first way, without scissors, preserved a little more details but presents some artifacts(easy fix; heal-selection/clone Tool)

Select by color way(modified)
Less steps, but minor issue as stated above
*SOLIDIFYING BOUNDARY TO EDGE RATIO*

1. New layer, black fill, put it under your image layer(flowers)
2. Click the flower layer, "Colors > Invert
3. "Colors > Brightness Contrast"
or
"Colors > Levels"
Focus on the contrast, whiteness of the background(soild)
If using Levels: on the top bar, bring the white triangle to the left until background is more white/soild. Black triangle to the right a little to sharpen edges.

This step helps color select distinguish edges better.

4. Colors > Auto > Color Enhance
5. Colors > Invert
-to change colors back to normal
6. Click "select by color" tool
- antialiasing
Threshold: 16.3

Click the background near the top-right (2/4th section of the image)
It should select the flowers, then push delete, revealing the black background layer.

_____ _____ _______ 2ND WAY____ ______ ______ ______ ____

Intelligent Scissors way (Edward lol!)

solidify edge to background
1. Repeat steps 1-3 in "Select by color way" above
These steps help the scissors distinguish edges better.

2. Colors > Auto > Color Enhance
3. Colors > Invert
-to change image colors back
4. Zoom to 200-300% for detailed/smoother selection
-(with your original file 4mb, you may want to use the "Navigate window" at
the bottom right to pan while making points.)
5. Click Scissors tool,
check options
-antialiasing
- Interactive Boundary
6. Start clicking around first flower group; top-left(see example screenshot)
.
    (click for important details related to tutorial)
.
push enter to make selection.
-shift-click to begin second selection on the bottom right group
without losing the first selection.

(You can use shift-click...shift-enter to add to current selection if you missed a spot.
shift-enter adds the selection to existing top left flower group.)

After you complete the second selection, hold "shift" and push enter.

You now have two separate selections.

6. Next, I inverted the selection
"Selection > Invert"
7. Delete, revealing black background.
8. Last, select the "Fuzzy Select" tool (magic wand)
In Fuzzy Select "Tool Options"
Check:
-antialiasing
-Feather: 15.9
-Select transparent areas
Threshold:165.2
--Click the empty space on flower image(it will select both flowers), push delete(this softens the flowers outline a little)
*Step 9 is more accurate then "Select > Feather" because you have more control (threshold)

Flatten image, then your done!! Smile phew lol.

I feel the first way yield decent results, but I like how edward scissor hand cut out the backround lmao! Goodluck with whatever you do and update us on how it goes!

(click below image for details of selection)


Attached File(s) Thumbnail(s)
   

"In order to succeed, your desire for success should be greater than fear of failure." BC
[Image: 29uocaf.png]
iFS007 tut vids on YT ~ auto color B&W landscape tut
Visit this user's website Find all posts by this user
Quote this message in a reply
Sep 14, 2013, 21:24
Post: #11
RE: Click on color and mass change
(Jul 3, 2013 07:41)iForStyle007 Wrote:  
(Jul 2, 2013 07:34)ofnuts Wrote:  IForStyle007 soon to be renamed EdwardScissorHands Smile

Hahaha, good one ofnuts, you crack me up! Funny movie if a bit scary,
I don't know if I'd let him cut my hair XD

I'm back with 2 mini-tutorials and pictures and rich2005 is right, there is no real one-click way to get the background with a photo like that.

*BUT! If you can reshoot the pictures, you'll save yourself a few steps and it will almost be like a 1-click fix to get a solid background color.
So after redoing photoshoot(if you decide to), try the below tutorials too if you need.

_ _ _ _ _ _ _ _
The first way, without scissors, preserved a little more details but presents some artifacts(easy fix; heal-selection/clone Tool)

Select by color way(modified)
Less steps, but minor issue as stated above
*SOLIDIFYING BOUNDARY TO EDGE RATIO*

1. New layer, black fill, put it under your image layer(flowers)
2. Click the flower layer, "Colors > Invert
3. "Colors > Brightness Contrast"
or
"Colors > Levels"
Focus on the contrast, whiteness of the background(soild)
If using Levels: on the top bar, bring the white triangle to the left until background is more white/soild. Black triangle to the right a little to sharpen edges.

This step helps color select distinguish edges better.

4. Colors > Auto > Color Enhance
5. Colors > Invert
-to change colors back to normal
6. Click "select by color" tool
- antialiasing
Threshold: 16.3

Click the background near the top-right (2/4th section of the image)
It should select the flowers, then push delete, revealing the black background layer.

_____ _____ _______ 2ND WAY____ ______ ______ ______ ____

Intelligent Scissors way (Edward lol!)

solidify edge to background
1. Repeat steps 1-3 in "Select by color way" above
These steps help the scissors distinguish edges better.

2. Colors > Auto > Color Enhance
3. Colors > Invert
-to change image colors back
4. Zoom to 200-300% for detailed/smoother selection
-(with your original file 4mb, you may want to use the "Navigate window" at
the bottom right to pan while making points.)
5. Click Scissors tool,
check options
-antialiasing
- Interactive Boundary
6. Start clicking around first flower group; top-left(see example screenshot)
.
(click for important details related to tutorial)
.
push enter to make selection.
-shift-click to begin second selection on the bottom right group
without losing the first selection.

(You can use shift-click...shift-enter to add to current selection if you missed a spot.
shift-enter adds the selection to existing top left flower group.)

After you complete the second selection, hold "shift" and push enter.

You now have two separate selections.

6. Next, I inverted the selection
"Selection > Invert"
7. Delete, revealing black background.
8. Last, select the "Fuzzy Select" tool (magic wand)
In Fuzzy Select "Tool Options"
Check:
-antialiasing
-Feather: 15.9
-Select transparent areas
Threshold:165.2
--Click the empty space on flower image(it will select both flowers), push delete(this softens the flowers outline a little)
*Step 9 is more accurate then "Select > Feather" because you have more control (threshold)

Flatten image, then your done!! Smile phew lol.

I feel the first way yield decent results, but I like how edward scissor hand cut out the backround lmao! Goodluck with whatever you do and update us on how it goes!

(click below image for details of selection)

Here is the update you requested Jul 3, 2013, 03:41.

The work was re-photographed with double polarization at night: polarized flash with polarized lens to eliminate all reflections.

After that, the following minor changes were made: EV=1.25, temperature=5264.

You will find attached a reduced jpeg of the end result.

Note that the work was rescued from a basement after decades of storage. The damage along the right side was left as is for authenticity.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Sep 14, 2013, 21:37
Post: #12
RE: Click on color and mass change
Looks Awesome!! Very clean & bonus points for preserving authentic look, glad we could be of some help Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Change color of arrow in arrow.scm gogreen 1 394 Jan 31, 2018 05:45
Last Post: ythgilb
  How to color bended text? Msa0503 1 151 Dec 17, 2017 08:23
Last Post: ythgilb
Question Saving to a gif format and choosing the color palette SpongeBob 0 160 Dec 13, 2017 19:13
Last Post: SpongeBob
  Color filled letters Dan M 1 160 Dec 13, 2017 17:12
Last Post: paynekj
  not able to draw different color rectangles manish 1 154 Nov 3, 2017 04:01
Last Post: ythgilb

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS