Options to enhance a poor image I have a C# desktop application. I am using EMGU as a wrapper for OpenCV.

I am receiving images in JPEG format that were originally taken by an analogue camera.

The quality of the image is poor (compared to digital cameras).

I want to see if I can use filters/methods derived from OpenCV/EMGU that could enhance the image.

What I mean by enhancement is to make the image a bit sharper.

I have played around with median, bilateral, contrast stretching to see if the image can be improved.

Nothing has worked.

Even if it can be confirmed to me that nothing I can do will enhance the image that will be an answer in itself. I can stop trying and persuade the client to use a digital camera instead...

This is the image:



This is the code that I apply to the original image to get the image you can see here:

        int factor = Shared.factor;
        int xVal = 288;
        int yVal = 360;
        using (Image&lt;Bgr, Byte&gt; color = new Image&lt;Bgr, byte&gt;(grid))
        {
            byte[] data = null;

              for (int x = 0; x &lt; xVal; x++)
              {
                  for (int y = 0; y &lt; yVal; y++)
                  {
                      grid[x, y, 0] = (byte)(grid[x, y, 0] / factor);
                      grid[x, y, 1] = (byte)(grid[x, y, 1] / factor);
                      grid[x, y, 2] = (byte)(grid[x, y, 2] / factor);
                  }
                }
                color.Data = grid;
                data = ImageToByteArray(color.ToBitmap());
        }


    private byte[] ImageToByteArray(Image imageIn)
    {
        byte[] data = null;
        try
        {
            using (MemoryStream ms = new MemoryStream())
            {
                imageIn.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
                imageIn.Dispose();
                data = ms.ToArray();
            }
        }
        catch (Exception ex)
        {
         //do something
        }
        finally
        {
            if (imageIn != null)
            {
                imageIn.Dispose();
            }
        }
        return data;
    }


As requested this is an original image but from a different view:
There is no way to regain any lost data at all. However, there are many phenomena that might distort the image in a recoverable way, not actually losing any data. You seem to try to undo a "point spread function", that is eg. some consistent blur. This would be not the only way an image can be distorted, however it is by far the most common.

In that case you would assume that the original image is convolved or filtered by an (initially unknown) point spread function. There may be the inverse operation to that. You could call this "equalization" of the frequency space of the image, then.

Not every inverse operation would be represented by an "edge sharpening" operation that is known a priori. You could maybe try to look at the image a virtually point-shaped light source gives, preferrably in front of a dark background. A laser pointer or a bright LED might serve as an example.