Hallo Besucher, der Thread wurde 5,2k mal aufgerufen und enthält 36 Antworten

letzter Beitrag von Snoopy am

Bildfehler durch Probleme mit JPG-Compression oder Kamera-Sensor?

  • Bei meinen Decappings treten sporadisch immer etwas seltsame Bildfehler auf:



    Kennst jemand diesen Effekt? Ist dies ein Problem der Kompression oder Kamera-Sensors?


    Sieht für mich immer so aus, als ob die Pixel-Spalten paarweise vertauscht wären

  • Das sind Kompressionsartefakte, MMN.


    JPG ist sehr schlecht für "harte" Übergänge wie bei Strichzeichnungen geeignet, sondern besser für Verläufe wie bei Fotos.

    Kannst du denn was anderes bei der Kamera einstellen als JPG? Oder kannst du das JPG konfigurieren? Dann möglichst wenig Kompression und möglichst hohe JPG-Qualität einstellen.

  • JPG ist sehr schlecht für "harte" Übergänge wie bei Strichzeichnungen geeignet, sondern besser für Verläufe wie bei Fotos.

    Kannst du denn was anderes bei der Kamera einstellen als JPG? Oder kannst du das JPG konfigurieren? Dann möglichst wenig Kompression und möglichst hohe JPG-Qualität einstellen.


    Es ist die Frage wann das Bild schlecht wird - schon direkt aus der Kamera oder erst nach (wieder) speichern als .JPG im Grafikprogramm.


    In meiner Canon Kamera gibt es min. 3 Kompressionsstufen und auch Raw


    Als erstes sollte man die Kameraeinstellung ansehen (Aufloesung und Kompression).

    Im Grafikprogramm (bei mir GIMP) speichere ich die .JPGs mit 80% Qualitaet und habe dabei keine Artefakte und die Dateigroesse ist dagegen auch noch angenehm klein.


    Ich aergere mich immer ein wenig, wenn in Foren Bilder direkt von der "ach so tollen" Handykamera kommen mit gefuehlt 3000x4000 Pixel, der "scharfe" Inhalt aber besser mit 800x600 gewesen waere, weil zu viele Pixel einfach doppelt sind, als haette man digitalen Zoom genommen - trotzdem daraus resultierend fuer Bild 3-6MB verbraet, anstatt bei scharfen 800x600 unter 200kb zu kommen ;)

  • Sieht für mich immer so aus, als ob die Pixel-Spalten paarweise vertauscht wären

    Wo ist da was vertauscht?:saint:

    Bild hängt an... einfach stark vergrößern.

    Hilft es, wenn Du das Bild im Bearbeitungsprogramm etwas verkleinerst, so dass die Geisterlinien verschwinden? Oder sind dann nicht mehr genug Details übrig?

  • Hilft es, wenn Du das Bild im Bearbeitungsprogramm etwas verkleinerst, so dass die Geisterlinien verschwinden? Oder sind dann nicht mehr genug Details übrig?

    Die Details wären ausreichend... es geht eher darum: Woher kommen die Fehler und wie verhindere ich sie.

  • Die Details wären ausreichend... es geht eher darum: Woher kommen die Fehler und wie verhindere ich sie.

    Da könnte ich leider nur spekulieren und nicht helfen. Eine andere Kamera für solche Spezialzwecke wirst Du nicht haben denke ich mal.
    Ich würde versuchen, mal in den Kamerasettings zu spielen. Ob es am Sensor liegt oder dem danach (Settings).

  • Ich halte das auch für Kompressionsartefakte. Fehler im Kamera-Sensor sehen anders aus. Und Fehler auf einer SD-Karte sehen nochmal anders aus.


    Was mich wundert ist das es nur 5% der Bilder betrifft.


    Gibt es auch vergleichbare Bilder (vom Inhalt her) wo der Fehler nicht sichtbar ist?

    Falls die Kamera RAW kann, ich könnte sowas mal mit meiner Fotosoftware testen. Allerdings dürfte es schwer werden ein RAW hier anzuhängen...


    Falls die Kamera verschiedene Kompressionsstufen hat wäre das, wie guidol schreibt, auch mal einen Versuch wert. Ich hab für Baustellenfotos eine Kamera mit Fein, Superfein und Standard. Wirkt sich hier dann auf die Dateigröße aus. Auflösung hab ich immer auf max. und verkleinere das dann über Batch-Bearbeitung, falls man doch mal einen Detailausschnitt braucht.

  • Ich werde mal den Weg "RAW" gehen... mit unterschiedlichen Kompressionsstufen war ich erfolglos.

  • Yes this looks like de-ringing effects. JPG compresses images in 8x8 pixel blocks. At the boundary of those 8x8 blocks, a de-ringing filter is applied. When you have a hard edge right on a 8x8 boundary, then on both sides of that edge there will be a ringing artifact.


    https://en.wikipedia.org/wiki/Ringing_artifacts


    There are cameras where you can influence the way the jpg encoding is done. On the other hand there are also cameras that output "RAW" which is actually never in fact really raw as the hardware sensor reading the camera cannot store all the raw pixel data as it flows in (bandwidth too high), so does some compression on-the-fly as the data streams into the main CPU of the camera.


    Next to ringing artifacts, all cameras suffer from pixel defects. Some cameras have "calibration" modes where they can detect the black-level of every pixel of the camera on startup - but almost no cameras have a white-level detection to complement that. In the past bad pixels were often stored in an eprom, but these days its far more common that the first hardware stage contains an always-on median filter that automatically gets rid of single pixel defects with no complex calibration. This median filter can and does cause artifacts in the image if you are close to the optical frequency - so if your image contains many sharp single pixel tranisions like moire patterns, they will get distorted by the always-on median filter.


    Many modern cameras in fact only support the highest resolutions with hardware-jpeg encoding enabled (almost always with fixed encoding coefficients) in the first stage to sufficiently reduce bandwidth to transfer the stream to the application cpu.


    You would not be the first to find out that RAW for a camera is in fact just decoded JPEG in the highest resolutions.


    But a good camera with good RAW will not have any 8x8 nor ringing artifacts.


    A good, perfect RAW image should have pixel defects visible and should have the individual black-level per pixel varying - visible as noise.

    Typically cheap and expensive cameras dont have much hardware difference, but they do have a difference in how much of the internal processing is described / configurable to the end user. You easily pay 10x more just to have a better documented camera.

  • You would not be the first to find out that RAW for a camera is in fact just decoded JPEG in the highest resolutions.

    Well, I did not follow those topics for quite some years now. I remember that the Canon 5D or 1DMKIII did some compression to their RAWs, or was it Pentax? Idk anymore... A Jpg compression on that RAW level sounds more than odd to me. What I can imagine: Some management decision like "The customer wants RAW? We'll give him RAW" for some cameras.


    Just googled "jpeglib deringing", as I can't remember that deriniging was part of Jpeg. Looks like some interesting stuff to read later, seems some nice things were added during the last years ;)

    By the way:
    I just noticed that the picture in #10 is perfectly aligned vertically, no rotation at all... Is this really coming directly from the camera?

  • The pictures are like this... many regular structures which also makes stitching time consuming:



    This pictures has a resolution of ~ 16000x18000px and consists of ~260 pictures.

    At higher magnification these artifacts become visible - especially at the borders to adjacent pictures.

  • Note also that a plain customer color CCD camera of - say - 10 mpixel resolution is not going to be able to sample a 10 mpixel jpeg image in reality.


    It depends on the CCD, some cameras have 4 pixels arranged in a square, doing RGBY. Others do RGB triplets.

    When you create an RGB image the same number of mpixels as your sensor, then for every pixel only one of the R,G B is actually measured. The other 2 will have been created from thin air with some filtering by the camera itself.


    Some RAW images at least do reflect the CCD capability.


    So when you create an image, even if you only want greyscale, the CCD is still sampling them as RGB (and sometimes Y).

    The median filters I mentioned above in the processing are separate for R,G,B so the median filtering has an effect at more than a single pixel out. The very least would be three R pixels medean filtered, could be 6 pixels at the CCD resolution.


    For good imaging where the reflection can have prism color effects like a piece of silicon, with an off-the-shelf ccd you really can only use 1/4 of the specified mpixel resolution correctly I would imagine even in RAW mode.


    It may help if you are able to use a monochromatic or some other type of controlled lightsource and take several pictures. This would enhance the resolution.

    It may even be possible to enhance the image resolution by taking several overlapping shots with a monochromatic source. That last is just a random thought.


    Because of lensing effects, it may be a lot easier to make many more images offset at smaller x/y and then take only the center part of each image. It might be the case - depending on the lenses - that stichting becomes far easier to automate as the lens distortion effects are much less. Again this is just a thought.

  • This pictures has a resolution of ~ 16000x18000px and consists of ~260 pictures.

    At higher magnification these artifacts become visible - especially at the borders to adjacent pictures.

    So the whole picture passed a lot of processing and transformations from stitching.

    What about the small one in #10? Is that a clip from the big one, or a source picture from the camera?

    The other 2 will have been created from thin air with some filtering by the camera itself.

    That's what we called demosaicing in the old days ;) Some algorithms are sharper, some can make artifacts, some have more noise.

    It may help if you are able to use a monochromatic or some other type of controlled lightsource and take several pictures. This would enhance the resolution.

    It may even be possible to enhance the image resolution by taking several overlapping shots with a monochromatic source. That last is just a random thought.

    Not sure if I get the idea...
    With such a light source you could simply multiply each of the 3/4 channels with a simple factor and combine them to a perfect grayscale picture without demosaicing. Do you mean that?