Mobile app version of vmapp.org
Login or Join
Berryessa866

: How to turn the grey background white in a phone camera picture of a book? Here is a picture (of many) that I took from a book with my phone camera. The problem is that the background is

@Berryessa866

Posted in: #AdobePhotoshop #BackgroundRemoval #Color #Cs6

Here is a picture (of many) that I took from a book with my phone camera.

The problem is that the background is too grey. I want it fully white. I have adobe Photoshop CS6. Does anyone know how I can fix this?

Note: I need instructions, as I need to do this to many other pics.

Thanks

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Berryessa866

5 Comments

Sorted by latest first Latest Oldest Best

 

@Hamm6457569

ImageMagick convert command may have conflict with Windows convert command. So you have to specify the full path.

Suppose we want to change the grey background of image phototext.png and create a new image phototext1.png.

Suppose ImageMagick is installed in the folder:
C:Program FilesImageMagick-7.0.3-Q16

Then write the follwing command on command prompt

"C:Program FilesImageMagick-7.0.3-Q16convert.exe" phototext.png -auto-level -white-threshold 78% phototext1.png

10% popularity Vote Up Vote Down


 

@Kaufman565

For people who don't have Adobe Photoshop, here's a free and cross-platform alternative:

Using ImageMagick, it can be done in command line

convert lQchR.png -auto-level -white-threshold 78% fish.png



This may require some fine tuning of the white threshold value, but it's quicker than GUI especially when you have multiple pictures:

convert *.png -auto-level -white-threshold 78% x-%04d.png



Edit:

Another method using division was pointed out in the comments by joojaa

convert fish.png ( +clone -blur 0x80 ) -compose Divide_Src -composite out_fish.png

10% popularity Vote Up Vote Down


 

@Carla748

I came up with a nice method for cleaning up pictures like this, and it works even when the background or lighting is uneven (that is, far worse cases than the example in this question) and it retains the colour.

My instructions are based on the Gimp, but it would be very similar in other programs like Photoshop.

EDIT: Gimp has a filter called "Difference of Gaussians" which implements the process described below in one step.

Firstly, make a duplicate of the layer:



Blur the copied layer with a Gaussian blur. Use a kernel size large enough that you can't make out any detail from the original image. I used 100px for the picture in the original post.



It will look like this:



Then set the "mode" of the blurred layer to "Divide".



The resulting image should be the line art on a white background.



What you are doing here is essentially a high-pass-filter on the image, removing the low-frequency information (slow changes in the background colour) and keeping the high-frequency information (the line art).

10% popularity Vote Up Vote Down


 

@Murphy569

First you'll want to desaturate the image (CMD+SHIFT+U), this removes any color and makes it easier to achieve pure white.

With your file open, choose Image->Adjustments->Levels. You'll get this:


Now bring the two outer triangles in like this (you'll need to play around with this until you get something you like):



You should end up with this!

10% popularity Vote Up Vote Down


 

@Holmes874

Ramp the contrast up with curves.

Instructions:

Select your image and press Ctrl-M. This will bring up the curves dialog.

Move the top point left and the bottom point right until your image becomes black and white. (that rhymes!)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme