You are on page 1of 1

#include "opencv2/imgproc/imgproc.

hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/photo.hpp"

using namespace std;


using namespace cv;

int main(int argc, char** argv)


{
Mat src = imread("Gaussian-Noise.jpg", 1);
Mat src2 = imread("Salt_and_Pepper Noise.png", 1);
Mat dst;
Mat dst2;

//Apply median filter


fastNlMeansDenoising(src, dst, 30, 7, 21);
fastNlMeansDenoising(src2, dst2, 30, 7, 21);

imshow("original", src);
imshow("result", dst);
imshow("original2", src2);
imshow("result2", dst2);
waitKey(0);

#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/photo.hpp"

using namespace std;


using namespace cv;

int main(int argc, char** argv)


{
Mat src = imread("sample image/pout.tif", 1);
Mat dst;

cvtColor(src, src, COLOR_BGR2GRAY);

equalizeHist(src, dst);

imshow("Original", src);
imshow("Histogram", dst);

waitKey(0);
}

You might also like