Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to change the background color(s) of a photo using GIMP

Posted on 2015-01-20
20
Medium Priority
?
1,934 Views
Last Modified: 2015-02-05
I intend to take a picture of my bicycle while it's leaning against the wall. Because it's leaning against a wall, most of the background of the photo will be a uniform color. The one caveat is that, because of the angle of the photo, I will not be able to eliminate the ground. Consequently, the background will be composed of two colors – the color of the wall and the color of the ground. Nonetheless, my ultimate objective will be to make the background one uniform color. Another way to put it would be to say that I want to eliminate the background to replace it with one of my choosing.

I haven't used GIMP in a while, and even when I did I wasn't using it to do photo retouching. I have installed version 2.8 on my Windows 7 system. I found an e-book on GIMP, but it is 900 pages long and difficult to navigate. I'm fairly certain, however, that I can use GIMP to accomplish my objective and I'm hoping that one of you experts can tell me how to go about it.
0
Comment
Question by:babyb00mer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
  • 2
20 Comments
 
LVL 14

Assisted Solution

by:Leslie Bloom
Leslie Bloom earned 800 total points
ID: 40560801
I think you have a few options here:

Use the free select tool to select what you would want to delete/change color of.
Use the scissors select tool to more accurately distinguish between object and background.
Use the foreground tool to set your background

Side note: bicycles can be tough to accurately remove backgrounds from because of the spokes, chains and cables.

Hope this helps!
0
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40560910
You may be able to place the bicycle on a clean painters tarp or some other uniformly colored surface, suitably stretched so that there are no shadows.

That would make it much easier to uses either the Fuzzy Select Tool or the Select by Color Tool to select and remove the background. In both cases you can adjust the threshold setting in the tool options. You may want to add a transparent (alpha) channel to your image in order to have a transparent background when you erase.
0
 

Author Comment

by:babyb00mer
ID: 40574437
I have ordered a backdrop stand. It will come with a roll of white paper. I don't want to use a white backdrop, so I will probably pick up a black and/or gray one(s). I will take the bicycle with me so I can get the opinion of those at the photo supply store.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40575327
Sounds like a plan - if you need more help with GIMP, please post...
0
 

Author Comment

by:babyb00mer
ID: 40576866
The backdrop stand arrived today! I haven't opened the box yet, but it is supposed to include a white backdrop. After conferring with the guys at the photo supply shop, I have gained some new insights. Consequently, I did not pick up any other backdrop colors. We discussed the "green screen" approach, but I was reminded that if I were to photograph a subject with reflective surfaces, it would pick up the green. Ideally, I would like to have the bicycle isolated (that is, with no background) on one layer, with the background on a second layer. To produce the final result, I would simply merge the layers.

We also discussed lighting. I told them that I only had two flashes – the one built into the camera as well as an external one. I was told that without the proper lighting I would probably be disappointed with the results. I told them that this was for my own use and I just wanted to get better results than I would by simply taking a photo with my iPhone. Also, I was hoping to use features in GIMP to produce some of the effects that I would get from fancy lighting.
0
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40577537
Since you haven't opened the box yet, perhaps you could get the same effect by placing the bike on stools (or something similar) against an interior wall of uniform color. These can easily be removed with GIMP by cropping the image.

You could take several photos using different light settings (flash, no flash, built-in flash only, external flash only),  and see what gives the best results.

Also, you could post few photos here to see what can be accomplished. I'd be glad to help further by giving you detailed explanations.
0
 

Author Comment

by:babyb00mer
ID: 40583145
I have taken a few pictures of my bicycle. I have attached an example. I hope the file is not too large.

The results of my efforts are not ideal (I've noticed some mistakes I made), but represent an implementation of the last suggestion – that being, to raise the subject off of the floor in an effort to better isolate it against the background. Notice that the electrical outlet is strategically placed so that it can easily be removed.

The pictures never really came out the way the subject looked when viewed by the naked eye. I believe that is because a wide angle view was used when taking the pictures. Most of the time that was 28 mm. It was always my intention to use 50 mm to take the shots, but without thinking I used zoom to frame the picture instead of moving the camera itself. I will take more pictures, but the next time I will pay attention to what I'm doing.

Anyway, I hope the example I provided is sufficient to give you some ideas on how I can achieve the results I want. If all else fails, I have yet to return the backdrop. :-)
0
 

Author Comment

by:babyb00mer
ID: 40583150
Oops! Here's the example I promised.My bicycle
0
 
LVL 33

Assisted Solution

by:Paul Sauvé
Paul Sauvé earned 1200 total points
ID: 40583194
rotated and cropped: My bicycle: Gimp-RotateTry to light the wall behind the bike... and over expose the wall.

The bike should then stand out in the photo...

keep me posted
0
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40583227
electrical outlet is strategically placed so that it can easily be removed...electrical outlet removed
0
 

Author Comment

by:babyb00mer
ID: 40583381
How difficult would it be to remove the remainder of the box that the bicycle is sitting on?
0
 
LVL 14

Assisted Solution

by:Leslie Bloom
Leslie Bloom earned 800 total points
ID: 40584374
That would probably be as simple as using the magic wand or lasso tool to select and delete it.

You can also set the white balance in your levels to easily blast out the white background (Photoshop).
0
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40584450
Not that difficult - but I find that the wall is a bit dark and matches some of the colors on the bike.

You mentioned that I only had two flashes – the one built into the camera as well as an external one.

So what I'm saying is try to position the external flash BEHIND the bike and the internal flash will light the bike. This should make the wall much lighter.

I would spend a bit more time taking a few photos THEN choose the easiest one to edit. As I said, maybe overexposing the wall a bit would make the bike stand out better.
0
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40585078
I dicked around in GIMP to remove the 'white background' and created a layer mask.

I replaced it with a green background:Green backgroundIt's not perfect, but it's well on the way!
0
 

Author Comment

by:babyb00mer
ID: 40585190
Wow! I don't know how you did it, but that's pretty impressive! Even the spokes were preserved!

Yeah, I figured there might be a way to do it with layers, but I just don't know GIMP.

I couldn't help but notice that the file size has gone down. What was the resolution of the final picture?
0
 
LVL 33

Assisted Solution

by:Paul Sauvé
Paul Sauvé earned 1200 total points
ID: 40585429
here is a larger version: 3413 x 2276 - 2.26 mb:Green Bkgrnd
0
 

Author Comment

by:babyb00mer
ID: 40585601
Wow! It just keeps getting better and better! Which GIMP tools are you using to fill in the minute details?
0
 
LVL 33

Accepted Solution

by:
Paul Sauvé earned 1200 total points
ID: 40587078
I opened in GIMP. The first thing to do is check the you have a transparency activated in the image: Layer ―> Transparency ―> Add Alpha Chanel

First, Duplicate the layer.

Use the Levels Tool on the new layer to make the image a bit lighter.

Use the Fuzzy Select tool to remove the background (I don't use the Select by Color Tool since it often selects colors inside the bike). This is an iterative process and can take some time and patience.

Duplicate this layer and add a layer mask

Here is how to create a layer mask:
Make sure the duplicate layer with the transparent is selected, then

In the layer area
 - right click in the area below the layer and click Add Layer Mask
 - click Layers alpha channel
 - click Invert mask
 - click Add

In the layer with the mask, select the layer and not the mask. Now you can add any color you want and the mask permits you to see through to the layer below.

I put the result in a .tif file so you can open it and save as a jpg without loosing the original.bicycle-bkgrd-01.tif

Here is the same image in jpg:jpg final
0
 

Author Closing Comment

by:babyb00mer
ID: 40591986
The feedback from Paul and Leslie was excellent! Based on their input, I have invested in additional equipment and photo editing software. Specifically, I have ordered a Muslim green screen (I already have the stand) as well as the PhotoKey application from Green Screen Systems. I was able to use the chromakey image that Paul created for me to test the editing software's capabilities.
0
 
LVL 33

Expert Comment

by:Paul Sauvé
ID: 40592329
Glad to hear everything is on track! Good luck.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question