AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Sharpening with different strength

The forum is to discuss topics related to different areas of image processing and computer vision.

Sharpening with different strength

Postby hannibalstgt » Tue Apr 17, 2018 1:45 pm

Hello,
I am developing an application to digitize super 8 cine films.
To do that, I have to grabb the cine film frames. When trying to enhance the sharpness of the frames I get very crisp images
which do not look very attractive (camera resolution 1920 x 1280, target image size 960 x 720 pixels - 720P video format).

SharpenedImage.jpg
The image is a kind of living (it shows a lot of bright white pixels at randomly changing postions)
SharpenedImage.jpg (25.43 KiB) Viewed 1097 times


Is there a simple way to modify the matrix which detemines the sharpening strength and (e.g.) provide the modified matrix to
the convolution filter.

Many thanks in advance for a hint.

Regards Wolfgang
hannibalstgt
 
Posts: 2
Joined: Tue Apr 17, 2018 1:27 pm

Re: Sharpening with different strength

Postby hannibalstgt » Wed Apr 18, 2018 6:50 am

Hello,

I found the solution:

Code: Select all
        private void showPicture(ref Bitmap aBitmap)
        {
            int[,] kernel5x5Sharpen = { { 0, 0, -1, 0, 0 }, { 0, -2, -2, -2, 0 },
                                        { -1, -2, 42, -2, -1 },
                                        { 0, -2, -2, -2, 0 }, { 0, 0, -1, 0, 0 }
                                      };
            Convolution sharpen = new Convolution(kernel5x5Sharpen);
            sharpen.ApplyInPlace(aBitmap);
            pBxFrame.Image = (System.Drawing.Image) aBitmap;
            pBxFrame.Show();
        }

SharpenedImage2-5x5Matrix_42.jpg
Sharpening with 5x5 Matrix - central Vlaue 42
SharpenedImage2-5x5Matrix_42.jpg (35.63 KiB) Viewed 1089 times


Modification of the matrix values changes the sharpening result !

Regards Wolfgang
hannibalstgt
 
Posts: 2
Joined: Tue Apr 17, 2018 1:27 pm




Return to Image Processing and Computer Vision