libvips / nip2

A spreadsheet-like GUI for libvips.
https://libvips.github.io/libvips/
GNU General Public License v2.0
362 stars 13 forks source link

Gaussian noise generator in nip2 creates image artifacts #103

Closed mhirsch closed 2 years ago

mhirsch commented 2 years ago

The Gaussian noise generator in nip2 seems to produce structured output -- I see bands in the image that should average to gray. Here's an example running Pattern_images_item.Noise_item.Gaussian_item.action with Mean 128 and Deviation 25. nip2-gaussian-noise

For comparison, here's an example using the Magick toolkit for nip2, add Noise with type set to Gaussian, and adding it to uniform 128 value image: im-gaussian-noise

Do you have any suggestions for getting the nip2 output to look close to ImageMagick?

Thanks!

jcupitt commented 2 years ago

Hi Matt, ouch, looks like the libvips random number generator should be improved. I've opened an issue: https://github.com/libvips/libvips/issues/2642

jcupitt commented 2 years ago

OK, fixed, I hope. Thanks for pointing this out.

mhirsch commented 2 years ago

Curious - will this fix make it's way back to nip2 any time soon, since it uses vips 7? Thank you again for taking the time to solve this so quickly!

jcupitt commented 2 years ago

Yes, the vips7 API is just a thin skin over vips8, so all vips8 fixes get into nip2.