# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Vignette effect

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?

Message 1 of 13
(327 Views)

## Re: Vignette effect

• 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)

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 2 of 13
(309 Views)

## Re: Vignette effect

• I'm using Vision toolkit

• 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.
Message 3 of 13
(289 Views)

## Re: Vignette effect

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?

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 4 of 13
(262 Views)

## Re: Vignette effect

@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....

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 5 of 13
(221 Views)

## Re: Vignette effect

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.

Message 6 of 13
(171 Views)

## Re: Vignette effect

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.

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 7 of 13
(161 Views)

## Re: Vignette effect

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

Message 8 of 13
(158 Views)
Solution
Accepted by topic author Hawk_se

## Re: Vignette effect

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

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 9 of 13
(155 Views)
Solution
Accepted by topic author Hawk_se

## Re: Vignette effect

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

Message 10 of 13
(136 Views)