Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the bilateral blur and sharpening in OpenCV4 Android?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Today, I would like to talk to you about the bilateral blur and sharpening in OpenCV4 Android. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something from this article.

Recently has been learning OpenCV4Android, follow the study and do DEMO. Today I learned bilateral blur and sharpening, which may be more commonly used in the future, so record it.

According to the environment we built last time, we set up several interfaces. Through the List above, we set up each function button. The main interface displays the function. Click on the corresponding function and select the picture to enter the effect. The figure is as follows:

We add bilateral fuzzy terms to Clistitem.

Public static final String IMAGE_BILATERALFILTER = "bilateral ambiguity"

Add this item to the main interface ListView

The functional interface writes the corresponding events

Call this function method

Next, let's run it to see the effect:

Bilateral blur is added to the main interface

After clicking, we found that there was an error, which means that our image is different from the number of channels for bilateral blur, so we have to change the image to 3 channels in the function. Let's go back to the calling method and add the conversion of the image.

Then we re-run the program to see the effect before and after the bilateral blur. After I run it here, I first cut off the picture and put it to the end to have a look.

Next we will do another step of sharpening.

Sharpening requires us to build a new Mat to set the size of the eye mold and declare the coefficient of sharpening (I'll write one by default here, and learn more about this coefficient later).

Then sharpen it with the function of ImgProc.filter2D

After adding the above, we run the program to put the original image, bilateral blur, bilateral blur and sharpening effects together.

Original drawing

Bilateral ambiguity

Bilateral blur and sharpening

Perhaps the parameter setting problem, the visual feeling of bilateral blur and sharpening after the effect is not much different, but take a closer look at the sharpened picture is much smoother. Later, I will continue to update the contents of my study.

After reading the above, do you have any further understanding of the bilateral blurring and sharpening in OpenCV4 Android? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report