LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vignette effect

Solved!
Go to solution

Hi,

 

I'm struggling to implement Vignette effect to my flat 16 bit grayscale image in order to reach the raw image seen below.

As you can see the brightest part of image is centre and the darkest parts are at corners (it looks Gaussian from centre to corners)

My aim is to implement this Vignette effect to my flat image by changing parameters. Does anybody have any idea how to do it?

 

Hawk_se_0-1617624016945.png

 

0 Kudos
Message 1 of 13
(1,835 Views)
  • Are you using plain LabVIEW or the vision toolkit?
  • How is the 16bit image represented? Is it just a 2D U16 array, for example?
  • What do you mean by "implement"? (e.g. do you want to simulate the effect artificially? Do you want to find the parameters that define an existing effect? Do you want to correct an image by eliminating the effect?, etc.)
  • What kind of 2D gaussian do you have in mind? (symmetric with the same width in all direction, separate width for x and y?) Is Gaussian just a simple approximation or does the theory exactly predict a Gaussian. Can we assume that 100% black is zero or Is there an offset)
0 Kudos
Message 2 of 13
(1,817 Views)
  • I'm using Vision toolkit

     

    Hawk_se_0-1617626976316.png
  • It's U16 raw image which is created from 2D array as seen above. (I've not been able to attach created image since the file *.raw type is not supported)
  • My aim is getting brighter center and darker corners to this flat image. I want to add this Vignette effect to image not eliminate or get parameters.
  • Gaussian is just simple approximation in order to explain my purpose. (If it's possible to do this effect by Gaussian, it should be symmetric with the same width in all direction) We can assume 100% black is zero. I'm not considering any dark noise effect for the offset value for the time being.
0 Kudos
Message 3 of 13
(1,797 Views)

It seems trivial to create a 2D DBL array containing a normalized  2D Gaussian of matching array size (given width and center in pixel units), then multiply that with your image followed by conversion back to U16). Have you tried that?

 

Instead of attaching a raw image (that we cannot read anyway), can't you attach a simple VI that contains the image as simple U16 array diagram constant?

0 Kudos
Message 4 of 13
(1,770 Views)

@altenbach wrote:

It seems trivial to create a 2D DBL array containing a normalized  2D Gaussian of matching array size (given width and center in pixel units), then multiply that with your image followed by conversion back to U16). Have you tried that?


Here's how that could look like....

 

altenbach_0-1617666867165.png

 

Message 5 of 13
(1,729 Views)

I was planning to use this equation to create 2D Gaussian image for two dimensional function. But if it doesn't work I'll try your solution. 

Hawk_se_0-1617724550825.png

 

0 Kudos
Message 6 of 13
(1,679 Views)

Earlier you said it should be symmetric in all direction (Quote: "If it's possible to do this effect by Gaussian, it should be symmetric with the same width in all direction").

 

Your new formula is basically the same as mine, except you have different width in x and y. If you make the two widths the same, you'll end up with my formula. If you want them different, my code would be easy to change accordingly.

0 Kudos
Message 7 of 13
(1,669 Views)

OK let's try to see what happens if it's symmetric or asymmetric. At least we're on the same way...

0 Kudos
Message 8 of 13
(1,666 Views)
Solution
Accepted by topic author Hawk_se

Here's one possibility if sigma x and y can differ:

 

altenbach_0-1617734278777.png

 

0 Kudos
Message 9 of 13
(1,663 Views)
Solution
Accepted by topic author Hawk_se

This is the solution what i needed... There is only one thing left, multiplying this 2D array with flat grayscale image.

Hawk_se_0-1617734343833.png

Hawk_se_0-1617734853565.png

 

 

 

0 Kudos
Message 10 of 13
(1,644 Views)