08-12-2025 01:15 PM
You can easily color the cells if desired, by mixing the RGB components differently. One example:
08-13-2025 07:35 AM
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?
08-13-2025 08:02 AM
08-13-2025 09:18 AM
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!
08-13-2025 09:49 AM
@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)
08-13-2025 10:18 AM
Here is the version 19 of my application!
08-13-2025 11:11 AM
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
08-13-2025 11:46 AM
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!
08-13-2025 12:32 PM
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.
08-13-2025 03:52 PM
What do you mean when you write "changing the width"? Thank you!