Recent

Author Topic: Image processing  (Read 629 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 8334
Image processing
« on: February 11, 2025, 10:37:15 pm »
I took a photo today and noticed that the camera I was using (an Olympus E520) had a stuck pixel.

Leaving (please!) language chauvinism aside, is anybody aware of a simple program that can fix such things (e.g. by averaging the surrounding pixels), or is it worth writing and publishing something from scratch?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

cdbc

  • Hero Member
  • *****
  • Posts: 1967
    • http://www.cdbc.dk
Re: Image processing
« Reply #1 on: February 11, 2025, 11:02:59 pm »
Hi
I would think, that is a job for "ze gimp"...? I seem to remember having read somewhere, it's got tools for this type of thingy, but boy is that an advanced piece of kit, I wouldn't know where to start looking...
...How about 'LazPaint', it can also do all sorts of clever stuff, @circular would know that.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 3.6 up until Jan 2024 from then on it's both above &: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 4.99

MarkMLl

  • Hero Member
  • *****
  • Posts: 8334
Re: Image processing
« Reply #2 on: February 11, 2025, 11:25:12 pm »
Hi
I would think, that is a job for "ze gimp"...? I seem to remember having read somewhere, it's got tools for this type of thingy, but boy is that an advanced piece of kit, I wouldn't know where to start looking...
...How about 'LazPaint', it can also do all sorts of clever stuff, @circular would know that.
Regards Benny

Gimp's got tools for just about everything, but you can't- using one particular idiom- say from the commandline "this file's got a one-pixel error at xx,yy, fix it by averaging from its neighbours".

Lazpaint... well, I played with it last Summer and was just about able to produce some basic bitmaps.

In any case, I think the important thing is to be able to batch-fix images, i.e. since the position of the dud pixel is known without needing any interaction.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

VisualLab

  • Hero Member
  • *****
  • Posts: 639
Re: Image processing
« Reply #3 on: February 12, 2025, 01:13:24 am »
In any case, I think the important thing is to be able to batch-fix images, i.e. since the position of the dud pixel is known without needing any interaction.

If so, there are two options to choose from:
  • writing a script in some language, I'm not saying which one on purpose because it's disgusting and besides, I don't like snakes because they're deceptive and malicious - ask Eve, she'll confirm that it's true :)
  • writing your own simple program, preferably in Lazarus :)

TRon

  • Hero Member
  • *****
  • Posts: 4158
Re: Image processing
« Reply #4 on: February 12, 2025, 01:18:44 am »
If the image is raw then you could perhaps give it a try with dcraw.
Today is tomorrow's yesterday.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8334
Re: Image processing
« Reply #5 on: February 12, 2025, 09:10:54 am »
If the image is raw then you could perhaps give it a try with dcraw.

Ah yes, that looks interesting.

writing your own simple program, preferably in Lazarus :)

I think that when I have time I'll knock together something "quick and dirty", influenced by dcraw but intended to cater for the most-common case i.e. JPEG and possibly annotating the metadata with the fact that it had been run (after participating in various "legal crap" and watching other stuff from afar I think traceability is important).

So far it looks like it's only a single pixel, but dcraw's idea of a .badpixels file tailored to each camera is a good one.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018