Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"file.h"
- #include"stdio.h"
- main()
- {
- FILE *fp;<br>
- char ch;<br>
- fp=fopen("D:\setups\tcc\Bluehills.bmp","rb+");
- if(fp == NULL)
- {
- printf("Error in opening the image");
- fclose(fp);
- exit(0);
- }
- printf("Successfully opened the image file");
- while((ch = fgetc(fp))!=EOF)
- {
- printf("%c",ch);
- }
- printf("nWriting to o/p completed");
- }
- IplImage* img = 0;
- IplImage* out = 0;
- if( argc < 2 ) {
- printf( "Usage: Accepts one image as argumentn" );
- exit( EXIT_SUCCESS );
- }
- img = cvLoadImage( argv[1] );
- if( !img ) {
- printf( "Error loading image file %sn", argv[1]);
- exit( EXIT_SUCCESS );
- }
- out = cvCreateImage( cvGetSize(img), IPL_DEPTH_8U, 3 );
- cvSmooth( img, out, CV_GAUSSIAN, 3, 3 );
- cvReleaseImage( &img );
- cvReleaseImage( &out );
- cvDestroyWindow( "Example1" );
- cvDestroyWindow( "Output" );
- return EXIT_SUCCESS;
Add Comment
Please, Sign In to add comment