Randomize
Description
Sets all image values to a random number between 0 and 1 for real images. For complex images, the modulus of the value will be between 0 and 1, and the argument will be between 0 and 2 pi.
Full scope is iplt::alg::Randomize in C++, resp iplt.alg.Randomize in Python.
Examples
C++
#include <iplt/image.hh> #include <iplt/alg/randomize.hh> using namespace iplt; int main() { ImageHandle img = CreateImage(Size(10,10)); img.ApplyIP( alg::Randomize() ); return 0; }
Python
from iplt import * img = CreateImage(Size(10,10)) img.ApplyIP( alg.Randomize() )
Back to Algorithm List
