Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!img.Ok()) return;
- wxBusyCursor wait;
- CImg<unsigned char> img1(this->img.GetWidth(),this->img.GetHeight(),1,3);
- CImg<float> msk(this->img.GetWidth(),this->img.GetHeight(),1,3);
- cimg_forXY(img1,x,y)
- {
- img1(x,y,0) = img.GetRed(x,y);
- img1(x,y,1) = img.GetGreen(x,y);
- img1(x,y,2) = img.GetBlue(x,y);
- }
- msk.draw_gaussian(this->img.GetWidth()/2.,this->img.GetHeight()/2., 10, CImg<>::vector(255).data);
- cimg_forXY(img1,x,y)
- {
- //msk(x,y,0,3);
- //this->img.SetRGB(x,y,int(img1(x,y,0)), int(img1(x,y,1)), int(img1(x,y,2)));
- this->img.SetRGB(x,y,int(img1(x,y,0) * msk(x,y,0)), int(img1(x,y,1) * msk(x,y,1)) ,int(img1(x,y,2) * msk(x,y,2)) );
- }
- Refresh();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement