Close Menu
Smart Green SpaceSmart Green Space

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    The Best Carpet Cleaners of 2026, Tested and Reviewed

    November 23, 2026

    The Best Garage Door Thresholds of 2026, Picked by Experts

    November 23, 2026

    How Modern Smartphones Talk To Satellites

    November 23, 2026
    Facebook X (Twitter) Instagram
    • About Us
    • Contact Us
    Facebook X (Twitter) Instagram Pinterest Vimeo
    Smart Green SpaceSmart Green Space
    • Home
    • Garden Technology
    • Gardening Tools
    • Plant Care
    • Smart Gardening
    • Smart Irrigation
    Smart Green SpaceSmart Green Space
    Home » Correcting The Pink Photo From My Modified Phone: A Follow
    Garden Technology

    Correcting The Pink Photo From My Modified Phone: A Follow

    Smart Green SpaceBy Smart Green SpaceNovember 23, 2026No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Correcting The Pink Photo From My Modified Phone: A Follow
    Share
    Facebook Twitter LinkedIn Pinterest Email

    A week or so ago I posted an Ask Hackaday, in which I asked the community for help with a common camera hacking problem I was having with my mobile phone to C mount conversion. In short, when you take a camera with a tiny lens and change that lens for another, the resulting photographs have a colour cast. It’s usually the right colour in the centre, and moves to a pink colour in a ring around the photo. The commenters came up with the right answer, and identified the problem as the phone software applying a correction to compensate for the relatively awful tiny lens. It’s a problem not limited to me, it’s appeared in many such projects including this one. So having been educated as to the nature of the problem, my next  step was to look at how to fix it.

    It’s A Flat Field Correction Problem, Folks!

    This image has pink edges fading to white in the centre.
    The Galaxy Note 3 calibration image.

    Of course I am not the first to encounter this in some form, thus as directory full of pictures it makes sense to use Image Magick if I can, and for a video I need to be able to use ffmpeg. So after a bit of messing about, here is the same process, for both command line packages. I have also placed the shell commands

    This image can then be processed in exactly the same way as the Image Magick version. Again, it’s applying a blur, and the same formula to make the calibration map.

    ffmpeg -i calibration-image-video.png 
    -vf "format=gbrp16le,gblur=sigma=60,
    geq=r='32768*r(X,Y)*g(W/2,H/2)/(max(g(X,Y),1)*max(r(W/2,H/2),1))':
    g='32768':
    b='32768*b(X,Y)*g(W/2,H/2)/(max(g(X,Y),1)*max(b(W/2,H/2),1))'" 
    -frames:v 1 -update 1 -pix_fmt rgb48be calibration-map-video.png

    Using the map, the conversion can then be performed on the video itself. This is a slow process though, on my run-of-the-mill Thinkpad it was processing only 1.8 frames per second.

    ffmpeg -i your-video.mp4 -loop 1 -i calibration-map-video.png 
    -filter_complex 
    "[0:v]format=gbrp16le;
    [1:v]format=gbrp16le[map];
    [map]blend=all_expr='A*32768/max(B,1)':shortest=1,
    format=yuv420p[out]" 
    -map '[out]' -map '0:a?' 
    -c:v libx264 -preset medium -crf 18 
    -c:a copy your-video-corrected.mp4

    So we’ve identified the problem as flat-field correction, and here are three ways to do it. The camera is now a lot closer to being useful, even if the processing steps can be a little cumbersome and the photos may require a little more post-processing. It’s obvious that in the phone hardware is the best place to do this, but without access to the internals of a 13-year-old Samsung this is the next best thing.

    Correcting From Modified Photo Pink
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleBuilding A Single
    Next Article How Modern Smartphones Talk To Satellites
    Smart Green Space
    • Website

    Related Posts

    Garden Technology

    How Modern Smartphones Talk To Satellites

    November 23, 2026
    Garden Technology

    Building A Single

    November 23, 2026
    Garden Technology

    HDMI To CSI For Anyone

    November 21, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Bonfire Dos and Don’ts Every Backyard Fire Builder Should Know This Fall

    October 20, 202623 Views

    Check Out the Educational Session Highlights for the 2027 Tropical Plant International Expo

    October 21, 20268 Views

    Our Favorite Cucumber Varieties for 2026

    October 16, 20267 Views
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram

    Subscribe to Updates

    Get the latest tech news from FooBar about tech, design and biz.

    Most Popular

    Bonfire Dos and Don’ts Every Backyard Fire Builder Should Know This Fall

    October 20, 202623 Views

    Check Out the Educational Session Highlights for the 2027 Tropical Plant International Expo

    October 21, 20268 Views

    Our Favorite Cucumber Varieties for 2026

    October 16, 20267 Views
    Our Picks

    Correcting The Pink Photo From My Modified Phone: A Follow

    November 23, 2026

    Building A Single

    November 23, 2026

    HDMI To CSI For Anyone

    November 21, 2026

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram Pinterest
    • About Us
    • Contact Us
    • Terms & Conditions
    • Privacy Policy
    • Disclaimer

    © 2026 smartgreenspace.com. All rights reserved. Designed by Top Desiginer .

    Type above and press Enter to search. Press Esc to cancel.