Skip to content
This repository was archived by the owner on Sep 7, 2025. It is now read-only.

Commit a44885a

Browse files
ameycodesabranhe
authored andcommitted
Added: Blur image using OpenCV
1 parent 086b175 commit a44885a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Using OpenCV to blur an image.
2+
3+
#include <opencv2/core/core.hpp>
4+
#include <opencv2/highgui/highgui.hpp>
5+
#include <opencv2/imgproc/imgproc.hpp>
6+
#include <stdio.h>
7+
#include <iostream>
8+
9+
using namespace cv;
10+
using namespace std;
11+
12+
int main()
13+
{
14+
Mat image = imread("jeep.jpg", CV_LOAD_IMAGE_UNCHANGED);
15+
16+
// Check for no data
17+
if (! image.data )
18+
{
19+
cout << "Could not open or find the image.\n";
20+
return -1; // unsuccessful
21+
}
22+
23+
blur(image,image,Size(10,10));
24+
25+
namedWindow( "jeep", CV_WINDOW_AUTOSIZE );
26+
imshow( "jeep", image );
27+
28+
waitKey(0);
29+
30+
return 0;
31+
}

0 commit comments

Comments
 (0)