Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

gaussian filter

Maybe this can also help you a bit (attachment).

 

Best regards,


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 11 of 37
(3,582 Views)

thank u so very much Klemen!

u have solved my problem. i am new to l.v so do not know about many VIs. I have never knew about the double conversion before. I,myself do some operation on matrix and arrays and found that 2d matrix multiplication is similar to simple matrix product and 2d array mutiplication is similar to element by element multiplications.

 thnx Klemen. I hope u'l help me in future too. 🙂

 

Fairy

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 12 of 37
(3,575 Views)

thank u so very much Klemen!

u have solved my problem. i am new to l.v so do not know about many VIs. I have never knew about the double conversion before. I,myself do some operation on matrix and arrays and found that 2d matrix multiplication is similar to simple matrix product and 2d array mutiplication is similar to element by element multiplications.

 thnx Klemen. I hope u'l help me in future too. 🙂

 

Fairy

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 13 of 37
(3,576 Views)

Klemen! plz tell me how did u generate the gaussian graph? i want to compare it for different values of sigma.

thnx

Fairy

0 Kudos
Message 14 of 37
(3,572 Views)

Use 3d surface graph (front panel 3d graph pallete) and wire the 2D Gaussian array to z matrix.

 

3d graph.png

 

Remember that bigger sigma needs a bigger convolution kernel.

 

Best regards,


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 15 of 37
(3,560 Views)

hi Andery!

u have made gaussian function with A=1. but i need A invers of sum of all gaussian 2d array elements. but it does not give the true result. why 😞

Fairy

0 Kudos
Message 16 of 37
(3,553 Views)

Hi Klemen!

i have generated the graph.(attachment). but ur graph is more nice than that of me 😞 how did u generate it in such a way?

may b it is a foolish question but plz tell me.:)

fairy

 

0 Kudos
Message 17 of 37
(3,547 Views)

It looks like your Gaussian is only constructed of 1D profiles. How did you generate the kernel?

 

I am attaching my previous example again with 3d surface.

 

I see your kernel is very large (260x260) - in my opinion you will have trouble filtering in spatial domain in this way, because kernel needs an image border which is "floor(size of the kernel/2)".

In this case, maybe it is better to filter in frequency domain?

 

Regards,

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 18 of 37
(3,542 Views)

hi

actualu  i have to convolv the same image with gaussian kernal with 3 different values of sigma. i have done this work. the next is that take difference of (log of originol image)-(log of convolved image) this operation is performed on all the three values separatly i have done this too. after this i have to divid all the three image swith 3 and then add them it gives me an enhanced luminance image in matlab and nearly similer results in L.V. but after that i have to done contrast stretching by applying the equation:

image pixel-min value of pixel/(max-min). and after that i took the ratio of this result to the original image. but before this i have to use if statement that if (pixel of resultant image<pixel of originol) then result pixel=original.

here comes a problem... in mat lab i have got some values of originol and some of resultant image but here in l.V i got all the values of originol because originol image has values from 0 to 255 but the resultant image has values in points that gives me ratio of both in the form of  all ones and i can not get my result.

if i do not do contrast stretching and only take the ratio and multiply ratio with rgb image of the luminance image i got an image with abrupt spreading of colours that makes no sens.

it is my last step to multiply the ratio with rgb image to get enhanced image. i have done same work in matlab but it is not being possible for me in L.V.

 

kindly tell me a solution. i am not attaching VI because its too large and i think it is so time consuming to understand it,

if some body can help me then tell me specially...  Klemen! kindly tell me some solution.

 

THnx

Fairy 

0 Kudos
Message 19 of 37
(3,522 Views)

@fairy55 wrote:

applying the equation:

image pixel-min value of pixel/(max-min). and after that i took the ratio of this result to the original image. but before this i have to use if statement that if (pixel of resultant image<pixel of originol) then result pixel=original.

here comes a problem... in mat lab i have got some values of originol and some of resultant image but here in l.V i got all the values of originol because originol image has values from 0 to 255 but the resultant image has values in points that gives me ratio of both in the form of  all ones and i can not get my result.

 


It seems to be that you should work with float-point representation Grayscale(SGL) instead of Grayscale(U8) images.

 

0 Kudos
Message 20 of 37
(3,514 Views)