Help Files Camera and Photography Forum

For general camera equipment and photography technique questions. Moderated by another view. Also see the Learn section, Camera Reviews, Photography Lessons, and Glossary of Photo Terms.
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Nov 2006
    Location
    UK
    Posts
    2

    Smile Help needed from photography/imaging experts about colour correction

    Help needed from photography/imaging experts about colour correction

    Hi all,

    I am currently undertaking a software project for university which helps blind people recognise colour. I point a webcam at a scene take a snap shot and pick out the object whose colour is being recognised.

    Obviously a webcam gives poor colour compared to a digital camera which everyone here will be used to, but my major problem is lighting conditions which I am sure you will have all encountered.

    To solve this I am trying a number of different methods including photographing different calibration targets prior to taking the actual photo. I have a target which has red green and blue on it and i also have a target which has black white and 18% grey on it.

    Firstly I would like to know if there are any thoughts on these 2 methods of colour correction, and possibly if there are any more i could consider.

    Secondly, and more importantly, I have been playing with the black white grey method in Adobe Photoshop CS2 to see what results it will give me. I used the curves tool and selected the black grey and white point on my target using the colour droppers. I then saved the curves files (ACV) and applied it to several photos I took straight after photographing the calibration target. The changes I saw ARE enough for what i need for my application.

    So now I know that the method works, I need to know what is actually happening to the pixels or histogram of the image when applying this method, i.e. is the histogram being stretch in some way? I simply dont know the answer to this and I need to find out because I need to implement the technique in a programming language working only with each pixel and the image histogram.

    I hope this is where the photography experts will come into their own.

    As a final note I have a second Red Green Blue calibration target of which i know the RBG values; Red = 195,0,0 Blue = 0,0,195 Green = 0,196,0

    I took an image of the target using the webcam and then used the dropper tool to work out the values for RGB in the actual image which were:

    Red = 151,56,45
    Green = 114,190,127
    Blue = 61,91,183

    How do I know alter the image so that the colours on the target within the image appear the exact colour they are supposed to be?

    PS. Ive attached two examples of calibration targets so you can see what the exact (poor) quality im working with.

    Thank you very much for your time, it is much appreciated.
    Lee
    Attached Thumbnails Attached Thumbnails Help needed from photography/imaging experts about colour correction-rgb-target-640480.jpg   Help needed from photography/imaging experts about colour correction-bwg-target-640480.jpg  

  2. #2
    Senior Member readingr's Avatar
    Join Date
    Nov 2004
    Location
    Basingstoke UK
    Posts
    4,564

    Re: Help needed from photography/imaging experts about colour correction

    Lee,

    This is a very complex issue and there is an excellent book that you could pick up in the library

    Colour Management by Bruce Fraser, Chris Murphy, and Fred Bunting ISBN 0-321-26722-2 which takes you through profiling all the devices from monitors and cameras to printing.

    The only sure way of getting what you want is expensive and you need specialist hardware to get it spot on.

    Calibrating the monitor, scanner, printer, and web cam (don't know much about web cams) will take quite a lot of work and also would need to be done regularly. LCD monitors for instance need to be done weekly (sometimes daily) if your serious about quality.

    The Scanner will need calibrating to get accurate scans and a decent quality scanner and a paper and ink profile built for the output.

    What I'm trying to say in a long winded way is there is no easy answer and you have to look at all the parts in the system before you can sit down and work out how your going to program all this.

    What is happening in CS2 is that it takes the data that you give it on the colours and then works out the differences and how it is going to substitute the values in the picture to comply. So for every pixel in the scanned image it will subtract or add the RGB values and convert them to the new value. So the RED BLUE and GREEN histograms are shifted by the appropriate amount.

    Hope this helps rather than confuses you.

    Any question please ask.

    Roger
    "I hope we will never see the day when photo shops sell little schema grills to clamp onto our viewfinders; and the Golden Rule will never be found etched on our ground glass." from The mind's eye by Henri Cartier-Bresson

    My Web Site: www.readingr.com

    DSLR
    Canon 5D; EF100-400 F4.5-5.6L IS USM; EF24-70 F2.8L USM 50mm F1.8 II; EF 100 F2.8 Macro
    Digital
    Canon Powershot Pro 1; Canon Ixus 100


  3. #3
    Junior Member
    Join Date
    Nov 2006
    Location
    UK
    Posts
    2

    Re: Help needed from photography/imaging experts about colour correction

    Hi Roger thanks for the quick reply. I understand what you said but I think the key here is that the camera (webcam) i am using is very low quality and so results are never going to be spectacular. The idea is simply to correct some of the very poorly lit images obtained from webcam by trying to estimate the environmental lighting, and then correcting the image accordingly. The picture quality itself is also of no concern to me because I am only recognising the colour of an object but I do plan on calibrating the webcam every time the software is used (to account for daylight changes etc) The whole method I am using would probably be totally unacceptable for a photographer.

    What I am particular interested in is the EXACT methods Photoshop/PSP use to correct the colour once i click the three droppers on black grey and white.

    Below is the sequence I will use when creating my program. I have done the following corrections using Photoshop: (see attached images)

    1. Take image of black white grey calibration target (chart uncorrected)
    2. Used Curves (Photoshop), Black and White Points(PSP) so correct the calibration target and saved as a correction preset. (chart corrected)
    3. Loaded uncorrected image (uncorrected book)
    4. Applied previous correction to fix colours in picture (corrected book)

    The book is actually a vivid orange colour which was originally much to dark and has been fixed using the calibration target. Just dont know the exact algorithm/actions is does to make these changes.

    Thanks again, Lee
    Attached Thumbnails Attached Thumbnails Help needed from photography/imaging experts about colour correction-chart-uncorrected-640480.jpg   Help needed from photography/imaging experts about colour correction-chart-corrected-640480.jpg  
    Attached Images Attached Images   

  4. #4
    Senior Member cyberlord's Avatar
    Join Date
    Mar 2006
    Location
    FWB, FL, USA
    Posts
    577

    Re: Help needed from photography/imaging experts about colour correction

    Lee,

    I don't know exactly how any graphics program does it, but here it is in a nutshell and maybe it will help steer you in the right direction.

    When you select the black point, the graphics program sets that color to the dark portion of the histogram, same for the white, it sets that color as the bright end of the histogram. Then when U select the 18% grey it sets that to the middle of the histogram. If you have all three RGB channels selected it will adjust the three color histograms equally. You can select color channels individually also.

    One other thing you can do to affect the range of black to white in a photo is to not set your black to 0 and not set your white to 255. If you bump the max values in the histogram away from the extreme buy 5 to 15 points you keep some detail in the highs and lows and will never have true black or white in the final results which will show any detail there if it was originally there to begin with.

    Hope this helps,

    Tim
    My blog - Photography Rulez


    'Slim' - K10D and *ist DL w/ SMCP DA 70mm 2.4 Limited, SMCP-DA 18-55mm f/3.5-5.6, SMC M 28mm f/2.8, SMC M 50mm f/1.7, and Tamron AF75-300mm f/4-5.6 LD Macro
    Slim of the Clan O'Canon - A1 w/ FD 28, 50, 70-210 & Sigma 500/1000 f8/f16

  5. #5
    Senior Member readingr's Avatar
    Join Date
    Nov 2004
    Location
    Basingstoke UK
    Posts
    4,564

    Re: Help needed from photography/imaging experts about colour correction

    Lee

    Aah! sorry did quite answer the question. I recommend you use Google Code search with colour correction as the search query and then take a look at the code in there. You will find what your looking for there.

    Try this url for the results I got
    http://www.google.com/codesearch?q=c...nG=Search+Code

    Roger
    "I hope we will never see the day when photo shops sell little schema grills to clamp onto our viewfinders; and the Golden Rule will never be found etched on our ground glass." from The mind's eye by Henri Cartier-Bresson

    My Web Site: www.readingr.com

    DSLR
    Canon 5D; EF100-400 F4.5-5.6L IS USM; EF24-70 F2.8L USM 50mm F1.8 II; EF 100 F2.8 Macro
    Digital
    Canon Powershot Pro 1; Canon Ixus 100


  6. #6
    Senior Member Medley's Avatar
    Join Date
    Nov 2006
    Location
    Hillsboro, OR, USA
    Posts
    919

    Re: Help needed from photography/imaging experts about colour correction

    Hello again Lee. Yes, it's the same Medley as on the other forum. Now that I understand your conundrum, let me throw a curve at you. Consider the following image:


    This image was created in the LAB colorspace. LAB has the unique ability to separate contrast (L channel) from color (AB channels) in this image, the color is a constant- 81a70b. A gradient was applied to the L channel to give the color varying degrees of contrast.
    Now, consider the implications in terms of your project. Setting the endpoints and graypoint correctly adjusts the contrast of the L channel. Read the values of the A and B channels to determine a color- in this case "red", and use the modified value of the L channel to determine an adjective: "pastel","vivid","dark" etc.

    Food for thought.

  7. #7
    Junior Member
    Join Date
    Jan 2007
    Posts
    1

    Re: Help needed from photography/imaging experts about colour correction

    can any one tell me what white ballance mode is all about and how to take a correct reading from the white card...please.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •