LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter noise images?

You can easily color the cells if desired, by mixing the RGB components differently. One example:

 

 

altenbach_0-1755022525771.png

 

Message 11 of 21
(123 Views)

Thank you for your assistance!

Regarding your first solution because it is not so complicated, let me explain what I understood, please:

 

1. Take the image and convert it in pixmap. The value of each pixel is presented in a hexadecimal value (3 bytes). 

2. Take one of the bytes (green color). They are with equal values because of the grayscale image.

3. Take the sine wave as a filter because it is a symmetric function. The square of the input tapers more nicely.

4. Each element of the square of the input sine wave array is divided by the sum of all elements of the square of the input sine wave. Really the sum of all elements of the kernel is exactly 1. I tried to make it 2 and the image containing the background became white and the filtered image was completely black.

5. Make convolution using the byte (green color) from line 2 and result array from line 4. 

6. Make subtraction between the byte (green color) (line 2) and the result from line 5. Subtraction is made dividing the byte (green color) from the background image. 

7. Complete a second convolution deleting small spikes (1 - 2 pixels) from the image. The filter is an array with elements equal to 1. 

8. The background image is created without using the second convolution.

 

As a conclusion, you create a background image and from the initial image you subtract the background image, right? 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 12 of 21
(98 Views)

@tiho_bg wrote:

The filter is an array with elements equal to 1. 


The convolution kernel is a 2D array where the sum of all elements is 1. The elements are typically not 1.

 


@tiho_bg wrote:

Subtraction is made dividing the byte (green color) from the background image. 


A subtraction is not a division

 

Message 13 of 21
(88 Views)

Yes, I agree! I apologize a lot! 

 

Could you please see my last solution? It doesn't include your code but I'm using the convolution filter and the result is better. I am trying to include your code in my application but I'm still not ready!

Download All
0 Kudos
Message 14 of 21
(72 Views)

@tiho_bg wrote:

Could you please see my last solution?

I cannot open your VI on my current computer. Please do a "save for previous" (LabVIEW 2020 or below) before attaching.

 

(There is also no need to attach the same images again)

0 Kudos
Message 15 of 21
(65 Views)

Here is the version 19 of my application!

0 Kudos
Message 16 of 21
(58 Views)

You did not attach the down-converted version. It will be found in a folder next to your VI. Down-conversion should never touch your existing VI

0 Kudos
Message 17 of 21
(49 Views)

The purpose of the sine wave kernel is to create a smooth background image, right (without viewing the cells)?

 

I apologise, I will send the application again!

0 Kudos
Message 18 of 21
(42 Views)

For debugging, just do "continuous run" while changing the width to see that the sharp features (cells) disappear more quickly with an increase in width. The correct balance point depends on the application.

0 Kudos
Message 19 of 21
(34 Views)

What do you mean when you write "changing the width"? Thank you!

0 Kudos
Message 20 of 21
(19 Views)