eLynx SDK
v3.0.1 C++ image processing API reference |
cout << ".Create Perling noise: perlin.png "; const EResolution resolution = RT_UINT8; const uint32 w = 256; const uint32 h = 256; const int seed = 128; const uint32 period = 51031; const double scale = 1.42; ImageVariant image; bool bSuccess = elxMakePerlin(image, resolution, w,h, seed, period, scale); if (bSuccess) bSuccess = image.Save("output/perlin.png"); cout << (bSuccess? "successfull" : "failed") << endl;
Output:
![]() perlin.png |
cout << ".Create grey gradient: gradient.png "; const EResolution resolution = RT_UINT8; const uint32 w = 500; const uint32 h = 31; ImageVariant image; bool bSuccess = elxMakeGradient(image, resolution, w,h); if (bSuccess) bSuccess = image.Save("output/gradient.png"); cout << (bSuccess? "successfull" : "failed") << endl;
Output:
![]() gradient.png |
cout << ".Create color checker: checker.png "; ImageVariant r,g,b; const EResolution resolution = RT_UINT8; const uint32 w = 256; const uint32 h = 256; bool bSuccess; bSuccess = elxMakeChecker(r, resolution, w,h, 5); bSuccess = elxMakeChecker(g, resolution, w,h, 6); bSuccess = elxMakeChecker(b, resolution, w,h, 7); ImageVariant image = ImageVariant(r,g,b); bSuccess = image.Save("output/checker.png"); cout << (bSuccess? "successfull" : "failed") << endl;
Output:
![]() checker.png |
ImageVariant H,L,S; const EResolution resolution = RT_Float; const uint32 w = 256; const uint32 h = 256; bool bSuccess; cout << ".create hue plane as a liquid" << endl; bSuccess = elxMakeLiquid(H, resolution, w,h); H.Add(-0.12); H.Mul(2.1); cout << ".create luminance as a Butterworth" << endl; double cutoff = 0.8; bSuccess = elxMakeButterworth(L, resolution, w,h, cutoff); L.Mul(0.8); cout << ".create saturation as a gradient" << endl; bSuccess = elxMakeGradient(S, resolution, w,h); ImageVariant image = ImageVariant(H,L,S, CS_HLS); image.ChangePixelFormat(PF_RGBub); cout << ".Merge h,l,s creating hls-fusion.png "; bSuccess = image.Save("output/hls-fusion.png"); cout << (bSuccess? "successfull" : "failed") << endl;
Output:
![]() hls-fusion.png |
Output:
![]() myImage.png |