tag:blogger.com,1999:blog-7021587312458287835.post7791133522572830830..comments2023-12-29T04:18:46.178-08:00Comments on OPEN SOURCE REVOLUTION: How to setup CodeBlocks for OpenCV programsAdithyahttp://www.blogger.com/profile/13442444383620202431noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7021587312458287835.post-83150243779704148832016-05-13T22:35:32.756-07:002016-05-13T22:35:32.756-07:00Thank You so much..Thank You so much..Anonymoushttps://www.blogger.com/profile/15495122566532108293noreply@blogger.comtag:blogger.com,1999:blog-7021587312458287835.post-45853698035967722542012-04-26T09:14:23.245-07:002012-04-26T09:14:23.245-07:00@Sid Seems like you have no linked the libraries p...@Sid Seems like you have no linked the libraries properly.Adithyahttps://www.blogger.com/profile/13442444383620202431noreply@blogger.comtag:blogger.com,1999:blog-7021587312458287835.post-39531405315001528632012-04-26T03:13:36.321-07:002012-04-26T03:13:36.321-07:00trying to run this program on codeblock v10.05 and...trying to run this program on codeblock v10.05 and opencv v2.2<br />and getting error as:<br />undefined reference to 'cv::namedwindow(std::string const&,int);<br />and so on.. please help me...<br /><br /><br />#include "opencv2/imgproc/imgproc.hpp"<br />#include "opencv2/highgui/highgui.hpp"<br /><br />#include <br /><br />using namespace cv;<br />using namespace std;<br /><br />int _brightness = 100;<br />int _contrast = 100;<br /><br />Mat image;<br /><br />/* brightness/contrast callback function */<br />void updateBrightnessContrast( int /*arg*/, void* )<br />{<br /> int histSize = 64;<br /> int brightness = _brightness - 100;<br /> int contrast = _contrast - 100;<br /><br /> /*<br /> * The algorithm is by Werner D. Streidt<br /> * (http://visca.com/ffactory/archives/5-99/msg00021.html)<br /> */<br /> double a, b;<br /> if( contrast > 0 )<br /> {<br /> double delta = 127.*contrast/100;<br /> a = 255./(255. - delta*2);<br /> b = a*(brightness - delta);<br /> }<br /> else<br /> {<br /> double delta = -128.*contrast/100;<br /> a = (256.-delta*2)/255.;<br /> b = a*brightness + delta;<br /> }<br /><br /> Mat dst, hist;<br /> image.convertTo(dst, CV_8U, a, b);<br /> imshow("image", dst);<br /><br /> calcHist(&dst, 1, 0, Mat(), hist, 1, &histSize, 0);<br /> Mat histImage = Mat::ones(200, 320, CV_8U)*255;<br /><br /> normalize(hist, hist, 0, histImage.rows, CV_MINMAX, CV_32F);<br /><br /> histImage = Scalar::all(255);<br /> int binW = cvRound((double)histImage.cols/histSize);<br /><br /> for( int i = 0; i < histSize; i++ )<br /> rectangle( histImage, Point(i*binW, histImage.rows),<br /> Point((i+1)*binW, histImage.rows - cvRound(hist.at(i))),<br /> Scalar::all(0), -1, 8, 0 );<br /> imshow("histogram", histImage);<br />}<br />void help()<br />{<br /> std::cout << "\nThis program demonstrates the use of calcHist() -- histogram creation.\n"<br /> << "Usage: \n" << "demhist [image_name -- Defaults to baboon.jpg]" << std::endl;<br />}<br /><br />const char* keys =<br />{<br /> "{1| |baboon.jpg|input image file}"<br />};<br /><br />int main( int argc, const char** argv )<br />{<br /> help();<br /><br /> CommandLineParser parser(argc, argv, keys);<br /> string inputImage = parser.get("1");<br /><br /> // Load the source image. HighGUI use.<br /> image = imread( inputImage, 0 );<br /> if(image.empty())<br /> {<br /> std::cerr << "Cannot read image file: " << inputImage << std::endl;<br /> return -1;<br /> }<br /><br /> namedWindow("image", 0);<br /> namedWindow("histogram", 0);<br /><br /> createTrackbar("brightness", "image", &_brightness, 200, updateBrightnessContrast);<br /> createTrackbar("contrast", "image", &_contrast, 200, updateBrightnessContrast);<br /><br /> updateBrightnessContrast(0, 0);<br /> waitKey();<br /><br /> return 0;<br />}Sidhttps://www.blogger.com/profile/12100913209284493903noreply@blogger.comtag:blogger.com,1999:blog-7021587312458287835.post-22227080981386419132012-04-21T13:43:55.336-07:002012-04-21T13:43:55.336-07:00Yes!! I've been trying to do this for a week n...Yes!! I've been trying to do this for a week now, and it finally worked!!!!!!!! Thank you so much!Enric Boixhttps://www.blogger.com/profile/05636295240937801217noreply@blogger.comtag:blogger.com,1999:blog-7021587312458287835.post-58282168272574720062011-11-17T14:26:02.398-08:002011-11-17T14:26:02.398-08:00thanks ...thanks ...danelhttps://www.blogger.com/profile/09383154500748638202noreply@blogger.comtag:blogger.com,1999:blog-7021587312458287835.post-72501323366556236532010-11-26T16:39:49.423-08:002010-11-26T16:39:49.423-08:00Just add C:\OpenCV2.0\bin into your PATH environme...Just add C:\OpenCV2.0\bin into your PATH environment variable<br /><br />or<br /><br />When you install OpenCV,<br /><br />Choose the option, Add OpenCV to the system PATH for current user which is not default oneAdithyahttps://www.blogger.com/profile/13442444383620202431noreply@blogger.comtag:blogger.com,1999:blog-7021587312458287835.post-32910815530691791882010-11-14T08:10:07.197-08:002010-11-14T08:10:07.197-08:00Hi im a Newbie at openCV
And used your guide to s...Hi im a Newbie at openCV <br />And used your guide to set openCV up on codeblocks and it worked so fare. Im wrighting the program from O´Reillys learning openCV, page 17. Just to see if it works, but I get this error when I run the program that it can´t find libcxcore200.dll file<br /><br />“the program cant start because libcxcore200.dll Is missing on the computer. install it to solve the problem.”<br /><br />But I have followed your guide and cant figure out were I fucked up. Can you please help me?Unknownhttps://www.blogger.com/profile/02455847542780355225noreply@blogger.com