- Jul 27 Sat 2013 09:38
-
Extracting the position of game board & recognition of game board pieces
Extracting the position of game board & recognition of game board pieces
- Jul 27 Sat 2013 04:54
-
NVIDIA GTX 650安裝
- Jul 27 Sat 2013 04:54
-
NVIDIA Performance Primitives (NPP) library
1. NVIDIA Performance Primitives (NPP) library
- Jul 27 Sat 2013 01:59
-
Tab Control and MenuStrip Visual Studio 2010
private: System::Void 開啟ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
tabControl1->SelectedIndex = 0;
}
private: System::Void 開啟ToolStripMenuItem1_Click(System::Object^ sender, System::EventArgs^ e) {
tabControl1->SelectedIndex = 1;
}
- Jul 27 Sat 2013 00:49
-
開啟攝影機

OpenCV: version 2.4.5
Visual Studio: version 2010
IsStop = false;
using namespace cv;
VideoCapture capture(0);
if (!capture.isOpened()) // check if we succeeded
return;
Mat src, src_gray, src_edge;
CvRect Rect;
long cnt = 0;
for (;;)
{
capture >> src;
System::Drawing::Graphics^ graphics = pictureBox1->CreateGraphics();
System::IntPtr ptr(src.ptr());
System::Drawing::Bitmap^ b = gcnew System::Drawing::Bitmap(src.cols,src.rows,src.step,System::Drawing::Imaging::PixelFormat::Format24bppRgb,ptr);
System::Drawing::RectangleF rect(0,0,pictureBox1->Width,pictureBox1->Height);
graphics->DrawImage(b,rect);
//----------------------------------------------------------------------------------------------------------------------
cvtColor( src, src_gray, CV_BGR2GRAY );
System::Drawing::Graphics^ graphics2 = pictureBox2->CreateGraphics();
System::IntPtr ptr2(src_gray.ptr());
System::Drawing::Bitmap^ b2 = gcnew System::Drawing::Bitmap(src_gray.cols/3,src_gray.rows,src_gray.step,System::Drawing::Imaging::PixelFormat::Format24bppRgb ,ptr2);
System::Drawing::RectangleF rect2(0,0,pictureBox2->Width,pictureBox2->Height);
graphics2->DrawImage(b2,rect2);
//----------------------------------------------------------------------------------------------------------------------
Canny( src_gray, src_edge, 50, 25, 3);
System::Drawing::Graphics^ graphics3 = pictureBox3->CreateGraphics();
System::IntPtr ptr3(src_edge.ptr());
System::Drawing::Bitmap^ b3 = gcnew System::Drawing::Bitmap(src_edge.cols,src_edge.rows,src_edge.step,System::Drawing::Imaging::PixelFormat::Format8bppIndexed ,ptr3);
System::Drawing::RectangleF rect3(0,0,pictureBox3->Width,pictureBox3->Height);
graphics3->DrawImage(b3,rect3);
cnt++;
label1->Text = Convert::ToString(cnt);
Application::DoEvents();
if(IsStop) break;
}
- Jul 26 Fri 2013 22:27
-
Show OpenCV Image on a Visual Studio Picture Box
- Jul 17 Wed 2013 19:57
-
Mean Shift Segmentation
Mean Shift Clustering/ Segmentation in Matlab
- Jul 04 Thu 2013 11:44
-
display cv::Mat (opencv 2.4.3) in pictureBox (Visual C++ 2010)
資料來源: display cv::Mat (opencv 2.4.3) in pictureBox (Visual C++ 2010)
Mat img;
openFileDialog1->Filter = "JPEG files (*.jpg)|*.jpg|Bitmap files (*.bmp)|*.bmp";
if(openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
Mat img;
openFileDialog1->Filter = "JPEG files (*.jpg)|*.jpg|Bitmap files (*.bmp)|*.bmp";
if(openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
- Jul 04 Thu 2013 11:41
-
2010的 C++/CLI 不支援IntelliSense
google後才知道2010的 C++/CLI 不支援IntelliSense了,
所以改用Visual AssistX 10.6.1827,可以在64位元的
VS2010執行。
安裝 VA_X_Setup1940
- Jul 04 Thu 2013 00:44
-
HoughCircle圓偵測
#include "stdafx.h"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
using namespace cv;
Mat src, src_gray;
/// Read the image
src = imread( "cd.jpg", 1 );
if( !src.data )
{ return -1; }
/// Convert it to gray
cvtColor( src, src_gray, CV_BGR2GRAY );
/// Reduce the noise so we avoid false circle detection
GaussianBlur( src_gray, src_gray, Size(9, 9), 2, 2 );
vector<Vec3f> circles;
/// Apply the Hough Transform to find the circles
HoughCircles( src_gray, circles, CV_HOUGH_GRADIENT, 1, src_gray.rows/8, 200, 100, 0, 0 );
/// Draw the circles detected
for( size_t i = 0; i < circles.size(); i++ )
{
Point center(cvRound(circles[i][0]), cvRound(circles[i][1]));
int radius = cvRound(circles[i][2]);
// circle center
circle( src, center, 3, Scalar(0,255,0), -1, 8, 0 );
// circle outline
circle( src, center, radius, Scalar(0,0,255), 3, 8, 0 );
}
/// Show your results
namedWindow( "Hough Circle Transform Demo", CV_WINDOW_AUTOSIZE );
imshow( "Hough Circle Transform Demo", src );
waitKey(0);
return 0;
}
- Jun 26 Wed 2013 07:38
-
安裝OpenCV 2.4.5
- Jun 26 Wed 2013 05:34
-
安裝OpenCV2 3 1
安裝檔案: OpenCV-2.3.1-win-superpack
安裝步驟: 2013 06 24 安裝OpenCV2 3 1
安裝步驟: 2013 06 24 安裝OpenCV2 3 1
