Community
cancel
Showing results for 
Search instead for 
Did you mean: 
catmancode
Beginner
84 Views

Needed Multiple Levels of Sharpen (Convolution V.S. Fixed Sharpen)

I am currently trying to reproduce the results from the fixed sharpen function with a 3x3 matrix within the convolution filter.

Does anyone happen to know what 3x3 matrix values would achieve the same level of sharpen with the fixed sharpen. Fixed function sharpen iplFixedFilter(pSourceImage,pDestImage,IPL_SHARPEN_3x3);

Secondly does anyone happen to know the rules for engagement on producingvalid incremental matrix values to allow for multiple levels of sharpen from that point?The only solution that I have come up with was to apply the matrix multiple times, which will be too time consuming on largeamounts of data. I am currently considering trying a larger matrix value to apply however I think I might be missing something here. Thank you in advance for your assistance.

Used functions below:

Fixed function sharpen iplFixedFilter(pSourceImage,pDestImage,IPL_SHARPEN_3x3);

convolution filter iplConvolve2D(pSourceImage, pDestImage, &kernel, 1, IPL_SUM);

0 Kudos
5 Replies
Rob_Ottenhoff
New Contributor I
84 Views

Quoting - catmancode

I am currently trying to reproduce the results from the fixed sharpen function with a 3x3 matrix within the convolution filter.

Does anyone happen to know what 3x3 matrix values would achieve the same level of sharpen with the fixed sharpen. Fixed function sharpen iplFixedFilter(pSourceImage,pDestImage,IPL_SHARPEN_3x3);

Secondly does anyone happen to know the rules for engagement on producingvalid incremental matrix values to allow for multiple levels of sharpen from that point?The only solution that I have come up with was to apply the matrix multiple times, which will be too time consuming on largeamounts of data. I am currently considering trying a larger matrix value to apply however I think I might be missing something here. Thank you in advance for your assistance.

Used functions below:

Fixed function sharpen iplFixedFilter(pSourceImage,pDestImage,IPL_SHARPEN_3x3);

convolution filter iplConvolve2D(pSourceImage, pDestImage, &kernel, 1, IPL_SUM);

Hi,

The matrix you are looking for is documented in the manual.

Regards,

Rob

catmancode
Beginner
84 Views

Quoting - Rob Ottenhoff

Hi,

The matrix you are looking for is documented in the manual.

Regards,

Rob

Thanks Rob,

That was helpful, the -1/8 with the middle weight value of 16/8matrix is the one you are refering to in the manual correct? I did give this a try and found that brightness jumps up a lot however if I use a middle weight of 1 it gives me a slight bump in sharpness without the brightness bump. However it gets me a little closer it still does not give me the same sharpness seen by the Fixed Sharpen function.

Rob_Ottenhoff
New Contributor I
84 Views

Quoting - catmancode

Thanks Rob,

That was helpful, the -1/8 with the middle weight value of 16/8matrix is the one you are refering to in the manual correct? I did give this a try and found that brightness jumps up a lot however if I use a middle weight of 1 it gives me a slight bump in sharpness without the brightness bump. However it gets me a little closer it still does not give me the same sharpness seen by the Fixed Sharpen function.

Hi,

Very strange, I checked and can conform your findings: the results of the fixed sharpen filter and of a convolution with the matrix from the manual differ. A bug ? Mistake in the manual ? I used a single channel greyscale lena picture.

Rob

catmancode
Beginner
84 Views

Quoting - Rob Ottenhoff

Hi,

Very strange, I checked and can conform your findings: the results of the fixed sharpen filter and of a convolution with the matrix from the manual differ. A bug ? Mistake in the manual ? I used a single channel greyscale lena picture.

Rob

I agree, from everything I have read about the convolution filter out in the world, it doesnot follow the intel library. That is if you balance out the matrix with themiddle numbermaking the other 8 numbers add up to zero there should be no brightness increase. However thethe documented sample matrix values do not functionlike this. Furthermore the larger or smaller the middle number in the matrix is suppose to increase or decrease the aparent sharpen level. I do like the quality of the fixed sharpen however the real issue for me comes down toapplying smaller incrementsfor sharpening. The convolution filter is the only available option within the library that I can see to do this and for whatever reason I can't seem to find matrix values that will increment in small steps rather only larger ones that fringe like mad.

ILevi1
Valued Contributor I
84 Views

You could also perform fixed sharpen and then blend the result with the original image by variable amount to get the variable amount of sharpening.
Reply