Skip to content

Instantly share code, notes, and snippets.

@udaya1223
udaya1223 / cmake.log
Created Dec 7, 2016
CMake Log - Building OpenCV3.1 with contrib package
View cmake.log
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 ...
@udaya1223
udaya1223 / makeChessboard.cpp
Last active Dec 28, 2016
Make a chessboard pattern using OpenCV for camera calibration
View makeChessboard.cpp
// 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++)
@udaya1223
udaya1223 / FindModes.cpp
Created Sep 21, 2017
Find modes of an array
View FindModes.cpp
#include <iostream>
#include <vector>
using namespace std;
void printArray(int *array, int size) {
for (int i = 0; i < size; i++)
{