This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
void printArray(int *array, int size) { | |
for (int i = 0; i < size; i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make a chessboard pattern given the num. of rows & cols, square size in pixels, and square colors | |
void crvlMakeChessboardPattern(Mat &outChessboard, int inRows, int inCols, int inSquareSize = 100, Scalar color1 = CV_RGB(0, 0, 0), Scalar color2 = CV_RGB(255, 255, 255)){ | |
CV_Assert(inRows > 1 && inCols > 1); | |
CV_Assert(inSquareSize > 0); | |
int chessboardImgCols = inCols*inSquareSize; | |
int chessboardImgRows = inRows*inSquareSize; | |
outChessboard = Mat(chessboardImgRows, chessboardImgCols, CV_8UC3, Scalar(0, 0, 0)); | |
for (size_t rows = 0, rowNum = 0; rows < chessboardImgRows; rows += inSquareSize, rowNum++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
found IPP (ICV version): 9.0.1 [9.0.1] | |
at: J:/Research Related Software/OpenCV/NEW_OpenCV_3.1.0/OpenCV_3.1.0_Source/3rdparty/ippicv/unpack/ippicv_win | |
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7") | |
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6") | |
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.4") | |
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2") | |
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) | |
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file | |
Check contents of vgg_generated_48.i ... | |
Check contents of vgg_generated_64.i ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _PrintMatrix(char *pMessage, cv::Mat &mat) | |
{ | |
printf("%s\n", pMessage); | |
for (int r = 0; r < mat.rows; r++) { | |
for (int c = 0; c < mat.cols; c++) { | |
switch (mat.depth()) | |
{ | |
case CV_8U: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sstream> | |
#define IMAGE_FILE_PATH "../../data/WideAngle" | |
#define LEFT_IMAGE_FILE_PATH "../../data/WideAngle" | |
#define LEFT_PREFIX "left_" | |
#define RIGHT_PREFIX "right_" | |
#define IMG_NUM_PAD (4) | |
#define IMG_EXTENSION "bmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mat srcImg = imread("image.jpg", CV_LOAD_IMAGE_COLOR); | |
Mat srcHSVImage, hue, sat, val; | |
vector<Mat> hsv; | |
cvtColor(srcImg, srcHSVImage, CV_BGR2HSV_FULL); | |
split(srcHSVImage,hsv); | |
hsv[0].copyTo (hue); //Hue channel | |
hsv[1].copyTo(sat); //Saturation channel | |
hsv[2].copyTo(val); //Value channel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
using namespace std; | |
int main(){ | |
vector<int> vector_of_int; | |
string str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string openCVType2str(int type) { | |
string r; | |
uchar depth = type & CV_MAT_DEPTH_MASK; | |
uchar chans = 1 + (type >> CV_CN_SHIFT); | |
switch ( depth ) { | |
case CV_8U: r = "8U"; break; | |
case CV_8S: r = "8S"; break; | |
case CV_16U: r = "16U"; break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mat test = Mat::zeros(nHeight, nWidth, CV_32FC4); | |
if(test.type() == CV_32FC4){ | |
printf("Correct data type\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#define oops(m,x) { perror(m); exit(x); } | |
main(int ac, char **av) | |
{ | |
int thepipe[2], /* first pipe for the first and second command */ | |
thesecondpipe[2], /* second pipe for the second and third commands*/ |
NewerOlder