mean filter
hi,
i am new to linux mint. I am doing project on image quality. how to implement mean filter on images using openCV. Please do the needful. Thanks |
Welcome to LQ!!
What is a "mean filter"? What is "OpenCV"? Have you tried GIMP? If GIMP does not do what you need, you can also search for GIMP plugins. |
Quote:
Have a look below, see if it helps you somehow: See the last paragraph of this link: http://www.cs.auckland.ac.nz/~tobi/openCV-Examples.html http://www.seas.upenn.edu/~bensapp/o...mgproc_filters |
Thank you very much giving me information but I am doing mean(average) filter on images in 'c'. could u pls tell me how to implement it.
Thanks. |
mukhram
just so you know " we will not do your homework " by 'mean" do you mean px value ? mean or median ? color or b&w tone? as a "box car" ? what !!! what examples HAVE YOU looked at ? what is it you DO want to do ? and what is it you DO NOT want to do ? |
Hello Friends,
Could u pls help me in how to read and write images in 'C'. Thanks and Regards. |
help?
pointers yes here is a link to a very nice and small bit of code that dose A BUNCH of things http://cimg.sourceforge.net/ and the tutorials http://cimg.sourceforge.net/referenc..._tutorial.html and examples -- part of the tutorials http://cimg.sourceforge.net/screenshots.shtml -------- but for "OpenCV"--- read there docs http://opencv.willowgarage.com/wiki/ http://opencv.willowgarage.com/docum...cpp/index.html -- and buy there BOOK --- http://www.amazon.com/Learning-OpenC.../dp/0596516134 |
i tried to execute a program to read and write images, but its showing errors. Please help me to rectify the error.
#include "cv.h" #include "highgui.h" int main( int argc, char** argv ) { char* filename = argc == 2 ? argv[1] : (char*)"example2.jpeg"; if( (image = cvLoadImage( filename, 1)) == 0 ) return -1; cvNamedWindow(wndname, 1); cvShowImage(wndname, image); cvWaitKey(0); cvReleaseImage(&image); cvDestroyWindow(wndname); return 0; } |
Quote:
please post the errors . |
Errors:
/home/moiz/Desktop/example4/example4.cxx: In function ‘int main(int, char**)’: /home/moiz/Desktop/example4/example4.cxx:14: error: ‘image’ was not declared in this scope /home/moiz/Desktop/example4/example4.cxx:16: error: ‘wndname’ was not declared in this scope /home/moiz/Desktop/example4/example4.cxx:17: error: ‘image’ was not declared in this scope make[2]: *** [CMakeFiles/example4.dir/example4.o] Error 1 make[1]: *** [CMakeFiles/example4.dir/all] Error 2 make: *** [all] Error 2 |
please also post the full build command that is giving you the error
i take it you are not doing this gcc -o example4 example4.cxx also WHERE did you git this "example" a url would be nice |
Hi,
i wrote the code to read and write images using OpenCV. the code is compiled with no errors. but when i tried to execute it, i got error. Please help me. here is the code: #include <stdlib.h> #include <stdio.h> #include <math.h> #include <cv.h> #include <highgui.h> #include <cxcore.h> #include <cxtypes.h> int main(int argc, char* argv[]) { IplImage* img=0; img=cvLoadImage("images.jpeg",3); if(img) printf("Could not load image file: %s\n","images.jpeg"); if(!cvSaveImage("im.jpeg",img)) printf("Could not save: %s\n","im.jpeg"); } error is: OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat, file /home/moiz/OpenCV-2.1.0/src/cxcore/cxarray.cpp, line 2376 terminate called after throwing an instance of 'cv::Exception' what(): /home/moiz/OpenCV-2.1.0/src/cxcore/cxarray.cpp:2376: error: (-27) NULL array pointer is passed in function cvGetMat Aborted |
Hi,
i wrote the code to read and write images using OpenCV. the code is compiled with no errors. but when i tried to execute it, i got error. Please help me. here is the code: #include <stdlib.h> #include <stdio.h> #include <math.h> #include <cv.h> #include <highgui.h> #include <cxcore.h> #include <cxtypes.h> int main(int argc, char* argv[]) { IplImage* img=0; img=cvLoadImage("images.jpeg",3); if(img) printf("Could not load image file: %s\n","images.jpeg"); if(!cvSaveImage("im.jpeg",img)) printf("Could not save: %s\n","im.jpeg"); } error is: OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat, file /home/moiz/OpenCV-2.1.0/src/cxcore/cxarray.cpp, line 2376 terminate called after throwing an instance of 'cv::Exception' what(): /home/moiz/OpenCV-2.1.0/src/cxcore/cxarray.cpp:2376: error: (-27) NULL array pointer is passed in function cvGetMat Aborted |
Code:
IplImage* img=0; |
hi
i tried to write a code for reading and writing images. this program is executed with no errors but it is not saving or writing the image. Please do the needful. Please help me. code: #include <stdlib.h> #include <stdio.h> #include <math.h> #include "cv.h" #include "highgui.h" #include <cxcore.h> #include <cxtypes.h> int main(int argc, char* argv[]) { IplImage* img=0; img=cvLoadImage("images.jpeg",4); if(!img) printf("Could not load image file: %s\n","images.jpeg"); int cvSaveImage( const char* img, const CvArr* im); } i took above instructions from the following link: http://opencv.jp/opencv-1.0.0_org/do...ef_highgui.htm |
All times are GMT -5. The time now is 09:36 PM. |