100+ results for 'IplImage cvLoadImage'
Not the results you expected?
sift.cpp (https://github.com/yianni/cappocacciaactivevision.git) C++ · 163 lines
10 int _tmain(int argc, _TCHAR* argv[])
11 {
12 /*IplImage *image = cvLoadImage("blue.jpg", CV_LOAD_IMAGE_COLOR);
14 if(image)
63 }*/
64 system("siftWin32.exe <blue1.pgm >tmp1.txt");
65 IplImage *image1 = cvLoadImage("blue1.pgm");
66 FILE* fp1=fopen("tmp1.txt","rb");
67 float *arr1x; float *arr1y; int *arr2;float scale,ori;int temp1, temp2;
123 }
124 //matching
125 IplImage *imagematch = cvLoadImage("blue2.pgm");
126 float *bestmatchx = (float*)malloc(sizeof(float)*temp1);
127 float *bestmatchy = (float*)malloc(sizeof(float)*temp1);
itkOpenCVImageBridgeTest.cxx (https://github.com/krismz/ITK.git) C++ · 369 lines
46 //
47 template<class TPixelType>
48 IplImage* ConvertIplImageDataType(IplImage* in)
49 {
50 // Figure out the right output type
163 // Test itk::Image -> IplImage
164 //
165 IplImage* outIpl = itk::OpenCVImageBridge::ITKImageToIplImage< ImageType >(baselineImage);
167 // check results of itk::Image -> IplImage
279 // Test itk::Image -> IplImage
280 //
281 IplImage* outIpl = itk::OpenCVImageBridge::ITKImageToIplImage< ImageType >(baselineImage);
283 // check results of itk::Image -> IplImage
284 IplImage* dataConvertedInIpl = ConvertIplImageDataType<ValueType>(inIpl);
285 double itkIplDiff = cvNorm(outIpl, dataConvertedInIpl);
HoughLines.java (https://github.com/pilarski/rlpark.git) Java · 138 lines
8 import static com.googlecode.javacv.cpp.opencv_core.cvGetSize;
9 import static com.googlecode.javacv.cpp.opencv_core.cvLine;
10 import static com.googlecode.javacv.cpp.opencv_highgui.cvLoadImage;
11 import static com.googlecode.javacv.cpp.opencv_imgproc.CV_GRAY2BGR;
12 import static com.googlecode.javacv.cpp.opencv_imgproc.CV_HOUGH_MULTI_SCALE;
25 import com.googlecode.javacv.cpp.opencv_core.CvPoint2D32f;
26 import com.googlecode.javacv.cpp.opencv_core.CvSeq;
27 import com.googlecode.javacv.cpp.opencv_core.IplImage;
29 /**
43 String fileName = args.length >= 1 ? args[0] : "pic1.png"; // if no params provided, compute the defaut image
44 IplImage src = cvLoadImage(fileName, 0);
45 IplImage dst;
46 IplImage colorDst;
47 CvMemStorage storage = cvCreateMemStorage(0);
48 CvSeq lines = new CvSeq();
vector.cpp (https://github.com/qiqidone/Vectorization.git) C++ · 321 lines
one_way_sample.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 119 lines
26 using namespace cv;
28 IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1, IplImage* img2,
29 const vector<KeyPoint>& features2, const vector<int>& desc_idx);
47 printf("Reading the images...\n");
48 IplImage* img1 = cvLoadImage(img1_name.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
49 IplImage* img2 = cvLoadImage(img2_name.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
82 printf("done\n");
84 IplImage* img_corr = DrawCorrespondences(img1, keypoints1, img2, keypoints2, desc_idx);
86 cvNamedWindow("correspondences", 1);
93 }
95 IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1, IplImage* img2,
96 const vector<KeyPoint>& features2, const vector<int>& desc_idx)
97 {
shear.c (https://github.com/alexsleat/GPC_IRB-120.git) C · 152 lines
3 #include "highgui.h"
5 int PxCount(IplImage *PxC);
7 int main( int argc, char** argv )
8 {
9 /* data structure for the image */
10 IplImage *img = 0;
11 IplImage *Right = 0;
12 IplImage *Left = 0;
13 IplImage* src = 0, * res = 0, * roi = 0;
23 /* load the image,
24 use CV_LOAD_IMAGE_GRAYSCALE to load the image in grayscale */
25 img = cvLoadImage( argv[1], CV_LOAD_IMAGE_GRAYSCALE );
26 cvThreshold(img, img, 110, 120, CV_THRESH_BINARY); //Threshold image
filter.cc (https://github.com/vbajpai/imagefilters.git) C++ · 290 lines
9 IplImage* src;
10 IplImage* dst;
12 public:
18 }
20 void setSource(IplImage *img){src = img;}
22 IplImage* doBlur(){
75 /* split channels */
76 IplImage* srcR = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 1);
77 IplImage* srcG = cvCreateImage(cvGetSize(src), IPL_DEPTH_8U, 1);
176 int filterImage(string filename){
178 IplImage* img = cvLoadImage(filename.c_str(), CV_LOAD_IMAGE_UNCHANGED);
179 if (img!=NULL){
HoughLines.java (https://bitbucket.org/cagcontactor/jcurious.git) Java · 116 lines
myBWlabel.cpp (https://github.com/ipa320/autopnp.git) C++ · 164 lines
calibrate.cc (https://github.com/jehc/MondocosmOS.git) C++ · 139 lines
69 IplImage *img = cvLoadImage(images[0], CV_LOAD_IMAGE_GRAYSCALE);
70 IplImage *imgColor = cvCreateImage(cvGetSize(img), 8, 3);
88 for(int imagesLoaded = 0; imagesLoaded < loadImageCnt; imagesLoaded++) {
89 img = cvLoadImage(images[imagesLoaded], CV_LOAD_IMAGE_GRAYSCALE);
91 cvCvtColor(img, imgColor, CV_GRAY2BGR);
HoughLines.java (https://gitlab.com/cvtung/javacv) Java · 117 lines
22 String fileName = args.length >= 1 ? args[0] : "pic1.png"; // if no params provided, compute the defaut image
23 IplImage src = cvLoadImage(fileName, 0);
24 IplImage dst;
25 IplImage colorDst;
26 CvMemStorage storage = cvCreateMemStorage(0);
27 CvSeq lines = new CvSeq();
29 CanvasFrame source = new CanvasFrame("Source");
30 CanvasFrame hough = new CanvasFrame("Hough");
31 OpenCVFrameConverter.ToIplImage sourceConverter = new OpenCVFrameConverter.ToIplImage();
32 OpenCVFrameConverter.ToIplImage houghConverter = new OpenCVFrameConverter.ToIplImage();
ImAcq.cpp (https://bitbucket.org/sertacolgunsoylu/opentld.git) C++ · 245 lines
imgcodecs_c.h (https://gitlab.com/geekshabeka/opencv) C Header · 117 lines
69 unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
70 */
71 CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
72 CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
95 /* decode image stored in the buffer */
96 CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
97 CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
opencv_demo_win32.cpp (https://bitbucket.org/raviyellani/opencv.git) C++ · 108 lines
14 //src points to the memory location where the input image is saved
15 printf("Load Image \r\n");
16 IplImage *src = cvLoadImage( filename, CV_LOAD_IMAGE_COLOR );
18 //check if loading was successfull
27 //the hough transformation works with greyscale images only
28 printf("Convert to greyscale\r\n");
29 IplImage *gsrc = cvCreateImage( cvGetSize(src), IPL_DEPTH_8U, 1 );
30 cvCvtColor(src,gsrc,CV_RGB2GRAY);
OpticalFlowTracker.java (https://bitbucket.org/cagcontactor/jcurious.git) Java · 94 lines
23 public static void main(String[] args) {
24 // Load two images and allocate other structures
25 IplImage imgA = cvLoadImage(
26 "image0.png",
27 CV_LOAD_IMAGE_GRAYSCALE);
28 IplImage imgB = cvLoadImage(
29 "image1.png",
30 CV_LOAD_IMAGE_GRAYSCALE);
33 int win_size = 15;
35 // IplImage imgC = cvLoadImage("OpticalFlow1.png",
36 // CV_LOAD_IMAGE_UNCHANGED);
37 IplImage imgC = cvLoadImage(
fitellipse.cpp (https://github.com/siegleal/iSanta.git) C++ · 134 lines
imgcodecs_c.h (https://gitlab.com/seclorum/groupie) C Header · 137 lines
73 unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
74 */
75 CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
76 CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
102 /* decode image stored in the buffer */
103 CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
104 CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
125 \****************************************************************************************/
127 #define cvvLoadImage(name) cvLoadImage((name),1)
128 #define cvvSaveImage cvSaveImage
129 #define cvvConvertImage cvConvertImage
Material.cpp (https://github.com/hashier/CG2.git) C++ · 247 lines
mser_sample.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 134 lines
49 {
50 char path[1024];
51 IplImage* img;
52 help();
53 if (argc!=2)
54 {
55 strcpy(path,"puzzle.png");
56 img = cvLoadImage( path, CV_LOAD_IMAGE_GRAYSCALE );
57 if (!img)
58 {
64 {
65 strcpy(path,argv[1]);
66 img = cvLoadImage( path, CV_LOAD_IMAGE_GRAYSCALE );
67 }
72 return 0;
73 }
74 IplImage* rsp = cvLoadImage( path, CV_LOAD_IMAGE_COLOR );
75 IplImage* ellipses = cvCloneImage(rsp);
featureLBPHist.c
(http://pam-face-authentication.googlecode.com/svn/)
C · 273 lines
✨ Summary
The code generates a Local Binary Pattern Histogram (LBP) feature descriptor for an input image. It calculates the LBP values for each pixel in the image and stores them in a 3D array, where each value corresponds to a specific bit pattern. The resulting histogram is then used as a feature descriptor for the image.
The code generates a Local Binary Pattern Histogram (LBP) feature descriptor for an input image. It calculates the LBP values for each pixel in the image and stores them in a 3D array, where each value corresponds to a specific bit pattern. The resulting histogram is then used as a feature descriptor for the image.
31 }
33 double getBIT(IplImage* img,double px,double py,double threshold)
34 {
35 if (px<0 || py<0 || px>=img->width || py>=img->height)
45 }
46 }
47 void featureLBPSum(IplImage * img, double * val)
48 {
49 double sum=0;
198 printf("%s %s \n",fullpath1,fullpath2);
200 IplImage* img=cvLoadImage(fullpath1,0);
201 IplImage* imgLBP=cvCreateImage( cvSize(img->width,img->height), 8, img->nChannels );
258 {
260 IplImage * img = cvLoadImage("abc.jpg",0);
261 int Nx = floor((img->width - 10)/10);
262 int Ny= floor((img->height - 10)/10);
EllipseFitting.cpp (https://github.com/siegleal/iSanta.git) C++ · 176 lines
52 {
53 char* path = imagePath;
54 IplImage* src = cvLoadImage(path);
55 cvSetImageROI(src, ROI);
62 // Create a grayscale image of the source image
63 IplImage* graysrc = cvCreateImage(cvSize(src->width, src->height), 8, 1);
64 cvSetImageROI(graysrc, ROI);
65 cvCvtColor(src, graysrc, CV_BGR2GRAY);
70 // Apply threshold for edge detection
71 IplImage* thresholdImg = cvCreateImage(cvSize(src->width, src->height), src->depth, 1);
72 cvSetImageROI(thresholdImg, ROI);
73 cvThreshold(graysrc, thresholdImg, threshold, 255, CV_THRESH_BINARY);
hog_test.cpp (https://gitlab.com/B3h3m0th/ccv) C++ · 106 lines
houghlines.c (https://github.com/siegleal/iSanta.git) C · 62 lines
taller_5 (Felipe Navarro's conflicted copy 2012-05-30).cpp (https://bitbucket.org/ecivision/eci_3d_vision_project.git) C++ · 111 lines
fundamental.cpp (https://github.com/joshuaeckroth/SURV-I.git) C++ · 394 lines
191 }
193 IplImage *east = cvLoadImage("../videos/plse1.png");
194 IplImage *west = cvLoadImage("../videos/plsw1.png");
361 }
363 IplImage *east_trans = cvCreateImage(imgsize, east->depth, east->nChannels);
364 IplImage *west_trans = cvCreateImage(imgsize, west->depth, west->nChannels);
366 cvWarpPerspective(west, west_trans, west_homo);
368 IplImage *east_trans_8bit = cvCreateImage(imgsize, east->depth, 1);
369 IplImage *west_trans_8bit = cvCreateImage(imgsize, west->depth, 1);
373 CvStereoBMState *bm = cvCreateStereoBMState();
374 IplImage *disparity = cvCreateImage(imgsize, IPL_DEPTH_16S, 1);
375 IplImage *vdisparity = cvCreateImage(imgsize, IPL_DEPTH_8U, 1);
dft.c (https://github.com/siegleal/iSanta.git) C · 137 lines
63 {
64 const char* filename = argc >=2 ? argv[1] : "lena.jpg";
65 IplImage * im;
67 IplImage * realInput;
68 IplImage * imaginaryInput;
69 IplImage * complexInput;
70 int dft_M, dft_N;
71 CvMat* dft_A, tmp;
72 IplImage * image_Re;
73 IplImage * image_Im;
74 double m, M;
76 im = cvLoadImage( filename, CV_LOAD_IMAGE_GRAYSCALE );
77 if( !im )
78 return -1;
CvvImage.cpp (https://github.com/guoyaohua/SmileyFace.git) C++ · 260 lines
102 if( !m_img || Bpp() != bpp || m_img->width != w || m_img->height != h )
103 {
104 if( m_img && m_img->nSize == sizeof(IplImage))
105 Destroy();
106 /* prepare IPL header */
120 }
121 #define HG_IS_IMAGE(img) \
122 ((img) != 0 && ((const IplImage*)(img))->nSize == sizeof(IplImage) && \
123 ((IplImage*)img)->imageData != 0)
140 bool CvvImage::Load( const char* filename, int desired_color )
141 {
142 IplImage* img = cvLoadImage( filename, desired_color );
143 if( !img )
144 return false;
154 if( r.width < 0 || r.height < 0 ) return false;
156 IplImage* img = cvLoadImage( filename, desired_color );
157 if( !img )
158 return false;
opencv_demo_thumb.cpp (https://bitbucket.org/raviyellani/opencv.git) C++ · 102 lines
17 //src points to the memory location where the input image is saved
18 printf("Load Image \r\n");
19 IplImage *src = cvLoadImage( lettername, CV_LOAD_IMAGE_COLOR );
21 //check if loading was successfull
30 //the hough transformation works with greyscale images only
31 printf("Convert to greyscale\r\n");
32 IplImage *gsrc = cvCreateImage( cvGetSize(src), IPL_DEPTH_8U, 1 );
33 cvCvtColor(src,gsrc,CV_RGB2GRAY);
ComponentHSVBackgroundSubtractionColor.cpp (https://github.com/roboshepherd/swistrackplus.git) C++ · 148 lines
27 wxFileName filename = mCore->GetProjectFileName(filename_string);
28 if (filename.IsOk()) {
29 mBackgroundImage = cvLoadImage(filename.GetFullPath().mb_str(wxConvFile), CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
30 }
31 if (! mBackgroundImage) {
54 void THISCLASS::OnStep() {
55 IplImage *inputimage = mCore->mDataStructureImageColor.mImage;
56 //Check the images
57 if (! inputimage)
86 {
87 //Make a temporary clone of the image in 3 seperate channels
88 IplImage* tmpImage[3];
89 for (int i = 0;i < 3;i++)
90 tmpImage[i] = cvCreateImage(cvGetSize(mBackgroundImage), 8, 1);
circle_detection.cpp (https://gitlab.com/juan-cardelino/misc_projects) C++ · 29 lines
histogram_tut.cpp (https://bitbucket.org/iankits/opencv_development.git) C++ · 158 lines
39 }*/
41 IplImage* src;
42 if( argc == 2 && (src=cvLoadImage(argv[1], 1))!= 0) {
43 // Compute the HSV image and decompose it into separate planes.
44 //
45 IplImage* hsv = cvCreateImage( cvGetSize(src), 8, 3 );
46 cvCvtColor( src, hsv, CV_BGR2HSV );
47 IplImage* h_plane = cvCreateImage( cvGetSize(src), 8, 1 );
48 IplImage* s_plane = cvCreateImage( cvGetSize(src), 8, 1 );
49 IplImage* v_plane = cvCreateImage( cvGetSize(src), 8, 1 );
50 IplImage* planes[] = { h_plane, s_plane };
51 cvCvtPixToPlane( hsv, h_plane, s_plane, v_plane, 0 );
52 // Build the histogram and compute its contents.
MycvProjectDoc.cpp (https://bitbucket.org/skyline75489/mycvproject.git) C++ · 186 lines
158 // ImageIO
160 BOOL CMycvProjectDoc::Load(IplImage** pp,LPCTSTR csFileName)
161 {
162 IplImage* pImg=NULL;
165 pImg = cvLoadImage(csFileName,-1); // ��ͼ���ļ�(DSCV)
166 if (!pImg){
167 AfxMessageBox("ͼʧܣͼʽ·Ƿȷ");
177 }
179 BOOL CMycvProjectDoc::Save(LPCTSTR csFileName,IplImage* pImg)
180 {
181 int bl;
document.cpp (https://github.com/tnzk/shineshockd.git) C++ · 125 lines
39 // Load the source image and template
40 // TODO: use any other file name
41 src = cvLoadImage("ex-t06.png", CV_LOAD_IMAGE_COLOR);
42 tmpl = cvLoadImage("template.bmp", CV_LOAD_IMAGE_COLOR);
67 // Draw the string specified onto a marker detected
68 Utf8Decoder u8d(s, (int)strlen(s));
69 IplImage* dst = this->said;
70 Detection detection = detections[detection_id];
image.c (https://bitbucket.org/leandromattioli/monnaie.git) C · 102 lines
latentsvmdetect.cpp (https://gitlab.com/Ruggero/SparkEngine_Desktop) C++ · 83 lines
Eigen.java (https://gitlab.com/Ap00rvSaxena/FaceRecognition-in-E-Attendance) Java · 57 lines
17 import static org.bytedeco.javacpp.opencv_face.*;
18 import static org.bytedeco.javacpp.opencv_highgui.*;
19 import static org.bytedeco.javacpp.opencv_imgcodecs.cvLoadImage;
20 import static org.bytedeco.javacpp.opencv_imgproc.*;
21 import static org.bytedeco.javacpp.opencv_objdetect.*;
40 MatVector images = new MatVector(imageFiles.length);
42 IplImage img=null;
43 int counter = 0;
44 int label;
46 for (File image : imageFiles) {
47 img = cvLoadImage(image.getAbsolutePath());
48 String temp= image.getName();
49 label = Integer.parseInt(temp.charAt(0)+"");
Blobs.java (https://bitbucket.org/yan_chen/pc-image-processing.git) Java · 80 lines
lottoscan.cpp (https://github.com/twelly/OpenCV.git) C++ · 143 lines
80 // Load template fle
81 IplImage* tmpl_0_to_9_img = cvLoadImage(tmpl_0_to_9_img_file, 0);
83 if(tmpl_0_to_9_img == NULL) {
88 // Load ticket image
89 IplImage* lotto_ticket_img = cvLoadImage(lotto_ticket_img_file, 0);
91 if(lotto_ticket_img == NULL) {
94 }
96 IplImage* tmp_ticket_img = cvCreateImage(cvGetSize(lotto_ticket_img), lotto_ticket_img->depth, 1);
98 // Pre-process images
ftype2.cpp (https://github.com/tnzk/shineshockd.git) C++ · 79 lines
ImageProcessor.java (https://github.com/scotdalton/lcs-bak.git) Java · 96 lines
29 public ImageProcessor(String filename) {
30 candidateImage = cvLoadImage(filename);
31 candidateSize = candidateImage.cvSize();
32 grayScaleCandidateImage =
33 cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE);
34 IplImage[] channels = new IplImage[3];
35 for(int i=0; i<3; i++)
36 channels[i] = IplImage.create(candidateSize, IPL_DEPTH_8U, 1);
53 }
55 public IplImage getEdgeImage() {
56 return getCannyEdgeImage();
57 }
60 IplImage returnImage =
61 IplImage.create(candidateSize,
62 IPL_DEPTH_8U, grayScaleCandidateImage.nChannels());
63 cvCanny(grayScaleCandidateImage, returnImage, 1, 2, 7);
main.cpp (https://github.com/twelly/OpenCV.git) C++ · 28 lines
6 {
7 CvMat* warp_matrix = cvCreateMat(3,3,CV_32FC1);
8 IplImage *src, *dst;
9 float mat_test[4][2] = {96.0f,236.0f,226.0f,305.0f,408.0f,94.0f,498.0f,106.0f};
10 float mat_test2[4][2] = {98.0f,231.0f,225.0f,306.0f,410.0f,94.0f,498.0f,106.0f};
12 if( argc == 2 && ((src=cvLoadImage(argv[1],1)) != 0 ))
13 {
14 dst = cvCloneImage(src);
Face.cpp (https://gitlab.com/shinvdu/rcs-db) C++ · 69 lines
16 int detect_and_draw_faces( IplImage* image, CvHaarClassifierCascade* cascade)
17 {
18 CvMemStorage* storage = cvCreateMemStorage(0);
40 {
41 CvHaarClassifierCascade *classifier = NULL;
42 IplImage* image = NULL;
43 int faces;
49 }
51 image = cvLoadImage( input_file );
52 if (image == NULL) {
53 printf("Cannot load image: %s\n", input_file);
feature_densedescriptors.cpp (https://github.com/makerere-compute/ocula.git) C++ · 129 lines
try.c (https://bitbucket.org/jialongl/pad.git) C · 117 lines
11 int main (int argc, char **argv) {
12 char window_name[] = "try";
13 IplImage *averaged;
14 CvSize imgSize;
15 int jpg_quality = 90;
17 if (argc == 1) {
19 IplImage* imgReds[N_IMAGES];
20 IplImage* imgGreens[N_IMAGES];
21 IplImage* imgBlues[N_IMAGES];
23 for (int i=0;i<N_IMAGES;i++) {
24 IplImage* img;
25 char filename[8];
26 sprintf(filename, "%d.jpg", (i+1));
tp2diff.c (https://bitbucket.org/a0viedo/orga2tp2.git) C · 195 lines
86 // Cargo las imagenes
87 IplImage *src_a = 0;
88 IplImage *src_b = 0;
89 IplImage *dst = 0;
90 int width;
91 int height;
93 if( (src_a = cvLoadImage (filename_a, CV_LOAD_IMAGE_GRAYSCALE)) == 0 )
94 {
95 printf("Error al cargar: %s\n", filename_a);
98 }
100 if( (src_b = cvLoadImage (filename_b, CV_LOAD_IMAGE_GRAYSCALE)) == 0 )
101 {
102 printf("Error al cargar: %s\n", filename_b);
feature_densesift.cpp (https://github.com/makerere-compute/ocula.git) C++ · 125 lines
OpticalFlow.cpp (https://github.com/yourtion/LearningOpenCV.git) C++ · 96 lines
19 int main(int argc, const char * argv[]) {
21 IplImage* imgA = cvLoadImage( "data/OpticalFlow0.jpg", CV_LOAD_IMAGE_GRAYSCALE );
22 IplImage* imgB = cvLoadImage( "data/OpticalFlow1.jpg", CV_LOAD_IMAGE_GRAYSCALE );
25 int win_size = 10;
27 IplImage* imgC = cvLoadImage( "data/OpticalFlow1.jpg", CV_LOAD_IMAGE_UNCHANGED );
29 IplImage* image_eig = cvCreateImage( img_sz, IPL_DEPTH_32F, 1 );
30 IplImage* image_tmp = cvCreateImage( img_sz, IPL_DEPTH_32F, 1 );
32 int corner_count = MAX_CORNERS;
50 CvSize pyr_sz = cvSize( imgA->width+8, imgB->height/3 );
52 IplImage* pyrA = cvCreateImage( pyr_sz, IPL_DEPTH_32F, 1 );
53 IplImage* pyrB = cvCreateImage( pyr_sz, IPL_DEPTH_32F, 1 );
filter_test.cpp (https://gitlab.com/B3h3m0th/ccv) C++ · 25 lines
background.cpp (http://moya-kinect.googlecode.com/svn/trunk/) C++ · 162 lines
17 bool transBackground( IplImage *initImage, IplImage *endImage, IplImage *dstImage, int startTime, int endTime, int currentTime){
18 //int startTime = ;
45 void initScrollBackground( IplImage* scrollImage, IplImage* bgImage, IplImage* endImage, int *backnum, bool *bScrollBackground, int *startCount, int *endCount, int count, string dir_path){
46 initScrollBackground( scrollImage, bgImage, endImage, backnum, bScrollBackground, startCount, endCount, count, dir_path, SCROLL_TIME);
47 }
142 bool startChangeBackground( IplImage* scrollImage, IplImage* bgImage, IplImage* startImage, IplImage** endImage,
143 int *backnum, bool *bTransBackground, bool *bScrollBackground, int *startCount, int *endCount, int count, string dir_path, std::vector<BgElement>* bgList){
main.cpp (https://github.com/straiki/VisionCup-Deep-Team.git) C++ · 118 lines
30 for(;;){
31 IplImage *image = video->next_frame();
33 if( image == NULL) break;//Pri nacteni prazdneho FRAMU == konec videa
103 cout << tta/(cvGetTickFrequency()*1000.) << " -- CELKOVY CAS ms" << endl;
104 // detect.DrawSezOblic();
105 //img = cvLoadImage("test/1.jpg");
106 // detect.setFrame(img);
107 // detect.DrawFaces();
circlesCountours.c (https://bitbucket.org/leandromattioli/monnaie.git) C · 73 lines
22 int main( int argc, char** argv )
23 {
24 IplImage* src;
25 // the first command line parameter must be file name of binary (black-n-white) image
26 if( argc == 2 && (src=cvLoadImage(argv[1], 0))!= 0)
27 {
28 IplImage* dst = cvCreateImage( cvGetSize(src), 8, 3 );
29 CvMemStorage* storage = cvCreateMemStorage(0);
30 CvSeq* contour = 0;
MYdisplay.cpp (https://github.com/straiki/VisionCup-Deep-Team.git) C++ · 56 lines
14 // bez odkliknuti
15 char MYdisplay::ShowImage(IplImage * image, const char * winName, int x, int y){
16 if( image != NULL){
17 cvShowImage(winName, image);
20 }
22 char MYdisplay::ShowImage(IplImage * image, char cvKey, const char * winName,int x, int y){
23 if( image != NULL){
24 cvShowImage(winName, image);
42 }
44 void MYdisplay::DrawPoint(IplImage * image, CvPoint P, int delka, int tloustka, CvScalar barva){
45 cvLine(image,cvPoint(P.x-delka,P.y),cvPoint(P.x+delka,P.y),barva,tloustka,8,0);
46 cvLine(image,cvPoint(P.x,P.y-delka),cvPoint(P.x,P.y+delka),barva,tloustka,8,0);
highgui.i (https://bitbucket.org/raviyellani/opencv.git) Swig · 91 lines
57 %include "./typemaps.i"
59 %newobject cvLoadImage;
60 %newobject cvLoadImageM;
61 %newobject cvLoadImageMat;
63 %nodefault CvCapture;
68 %newobject cvCreateVideoWriter;
70 /** modify the following to return CvMat instead of IplImage */
71 %ignore cvLoadImage;
72 %rename (cvLoadImage) cvLoadImageMat;
73 %inline %{
74 CvMat * cvLoadImageMat(const char* filename, int iscolor=CV_LOAD_IMAGE_COLOR ){
fitline.cpp (https://gitlab.com/tomtana/PalletDetectionCpp) C++ · 73 lines
CvvImage.cpp (https://github.com/zeruniverse/Gesture_Recognition.git) C++ · 259 lines
102 if (!m_img || Bpp() != bpp || m_img->width != w || m_img->height != h)
103 {
104 if (m_img && m_img->nSize == sizeof(IplImage))
105 Destroy();
106 /* prepare IPL header */
120 }
121 #define HG_IS_IMAGE(img) \
122 ((img) != 0 && ((const IplImage*)(img))->nSize == sizeof(IplImage) && \
123 ((IplImage*)img)->imageData != 0)
140 bool CvvImage::Load(const char* filename, int desired_color)
141 {
142 IplImage* img = cvLoadImage(filename, desired_color);
143 if (!img)
144 return false;
154 if (r.width < 0 || r.height < 0) return false;
156 IplImage* img = cvLoadImage(filename, desired_color);
157 if (!img)
158 return false;
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 50 lines
10 int main(int argc, char **argv) {
11 // intit
12 IplImage *srcImage;
13 cvNamedWindow("srcImage",CV_WINDOW_AUTOSIZE);
14 IplImage *erodeImage;
15 cvNamedWindow("erodeImage",CV_WINDOW_AUTOSIZE);
16 IplImage *dilateImage;
17 cvNamedWindow("dilateImage",CV_WINDOW_AUTOSIZE);
18 IplImage *gaojiImage;
21 assert(argv[1]);
22 // load image
23 srcImage = cvLoadImage(argv[1],CV_LOAD_IMAGE_ANYCOLOR);
24 cvShowImage("srcImage",srcImage);
25 // 自定义核
main.cpp (https://github.com/osuar/iarc.git) C++ · 103 lines
Program.cs (https://github.com/VahidN/OpenCVSharp-Samples.git) C# · 160 lines
72 /*private static void applyLinearFilter_version2xDeprecated()
73 {
74 using (var src = new IplImage(@"..\..\Images\Penguin.Png", ImreadModes.AnyDepth | ImreadModes.AnyColor))
75 using (var dst = new IplImage(src.Size, src.Depth, src.NChannels))
99 private static void testBuiltinFilters_version2xDeprecated()
100 {
101 using (var src = new IplImage(@"..\..\Images\Car.jpg", ImreadModes.AnyDepth | ImreadModes.AnyColor))
102 {
103 using (var dst = new IplImage(src.Size, src.Depth, src.NChannels))
130 int main (int argc, char **argv)
131 {
132 IplImage *src_img = 0, *dst_img;
133 float data[] = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
134 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
138 if (argc >= 2)
139 src_img = cvLoadImage (argv[1], CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
140 if (src_img == 0)
141 exit (-1);
demhist.c (https://github.com/siegleal/iSanta.git) C · 125 lines
loadcvimage.cpp (https://github.com/yianni/cappocacciaactivevision.git) C++ · 136 lines
22 }
24 IplImage* tempimg = cvLoadImage( filename.c_str(), -1);
25 if(!tempimg) { std::cerr << "LoadCVImage::load()::ERROR::ERROR opening file [" << filename << "]\n"; return NULL; }
51 cvReleaseImage(&tempimg);
52 if(tempimg) { std::cerr << "LoadCVImage::load()::ERROR::Failed to release IplImage\n"; return NULL; }
54 //if(debug) { std::cout << "LoadCVImage::load()::finished\n"; }
56 }
58 CVImage* LoadCVImage::load(IplImage* InputImage) {
59 if(m_checkfileexistence) {
tp2diff.c (https://gitlab.com/mcaravario/orga2-tps) C · 202 lines
90 // Cargo las imagenes
91 IplImage *src_a = 0;
92 IplImage *src_b = 0;
93 IplImage *dst = 0;
94 int width;
95 int height;
97 if( (src_a = cvLoadImage (filename_a, CV_LOAD_IMAGE_UNCHANGED)) == 0 )
98 {
99 printf("Error al cargar: %s\n", filename_a);
102 }
104 if( (src_b = cvLoadImage (filename_b, CV_LOAD_IMAGE_UNCHANGED)) == 0 )
105 {
106 printf("Error al cargar: %s\n", filename_b);
hello.cpp (https://github.com/xushiwei/winx.git) C++ · 101 lines
distrans.c (https://github.com/siegleal/iSanta.git) C · 189 lines
18 // The output and temporary images
19 IplImage* dist = 0;
20 IplImage* dist8u1 = 0;
21 IplImage* dist8u2 = 0;
22 IplImage* dist8u = 0;
23 IplImage* dist32s = 0;
25 IplImage* gray = 0;
26 IplImage* edge = 0;
27 IplImage* labels = 0;
102 char* filename = argc == 2 ? argv[1] : (char*)"stuff.jpg";
104 if( (gray = cvLoadImage( filename, 0 )) == 0 )
105 return -1;
ffilldemo.c (https://github.com/siegleal/iSanta.git) C · 187 lines
12 #endif
14 IplImage* color_img0;
15 IplImage* mask;
16 IplImage* color_img;
17 IplImage* gray_img0 = NULL;
18 IplImage* gray_img = NULL;
19 int ffill_case = 1;
20 int lo_diff = 20, up_diff = 20;
72 char* filename = argc >= 2 ? argv[1] : (char*)"fruits.jpg";
74 if( (color_img0 = cvLoadImage(filename,1)) == 0 )
75 return 0;
TestDetection.cpp (https://github.com/sun11/Face-Recognition.git) C++ · 80 lines
warp.cpp (https://github.com/joshuaeckroth/SURV-I.git) C++ · 55 lines
Histogram.cpp (https://gitlab.com/Qbsuran_Alang/instafilter.git) C++ · 250 lines
21 double splitColor(const IplImage *src, const Color color);
22 IplImage *convertImageRGBtoHSV(const IplImage *imageRGB);
24 bool _stdcall HistogramProcess(LPWSTR csInputPath, LPWSTR csOutputPath)
31 //load image
32 IplImage *img = cvLoadImage(inputPath, 1);
34 if(!img)
36 else
37 {
38 IplImage *hsv = convertImageRGBtoHSV(img);
39 IplImage *H = cvCreateImage(cvGetSize(hsv), 8, 1);
123 }//end splitColor
125 IplImage *convertImageRGBtoHSV(const IplImage *imageRGB)
126 {
127 float fR, fG, fB;
contours.cpp (https://gitlab.com/vyablokov/opencvtest) C++ · 40 lines
irtkFileOpenCVToImage.cc (https://gitlab.com/mariadeprez/irtk-public) C++ · 62 lines
MyCapture.cpp (https://github.com/p1r4nh4/CellTrack.git) C++ · 133 lines
7 {
8 files = files_;
9 if(!(frame = cvLoadImage(files[0].mb_str()))){
10 wxLogError(_T("Failed to read image file [ %s ]. Corrupt file or unsupported codec."), files[0].c_str());
11 return;
72 // The frame is already queried in the derived classes. Here, we just set the
73 // image parameters from frame obtained upon the first queryFrame call.
74 IplImage* MyCapture::queryFrame(int pos_){
75 if (!step) {
76 unsigned char *raw;
79 return frame;
80 }
81 IplImage* MyCapture_Files::queryFrame(int pos_)
82 {
83 if ( pos_ >= 0 )
VideoTest.cpp (https://github.com/dakk/Misc.git) C++ · 159 lines
20 /** Replace your face with a trollface */
21 void VideoTest::Trollize(IplImage* frame)
22 {
23 cvClearMemStorage( fStorage );
54 // Create a new image to resize the original trollface
55 IplImage *temp = cvCreateImage(cvSize(r->width, r->height), frame->depth, frame->nChannels);
57 // Swap the real image in the temp buffer with the new dimension
76 {
77 CvCapture* capture;
78 IplImage* frame;
79 IplImage* frame_mod;
105 // Load the trollface
106 fImage = cvLoadImage("data/trollface.png", CV_LOAD_IMAGE_UNCHANGED);
108 if(!fImage)
baby_food.cpp (https://github.com/Newky/4thYear.git) C++ · 121 lines
15 // Locate the red pixels in the source image and return the percentage of red points found.
16 int find_spoons( IplImage* source, IplImage* result, IplImage* temp )
17 {
18 int red_point_count = 0;
55 // located. Normally this would be done by using a large number of training images in order to allow
56 // optimal classification.
57 void write_number_of_spoons_on_image( IplImage* image, int percentage_of_red_points )
58 {
59 int num_spoons = (percentage_of_red_points < 3) ? 0 : (percentage_of_red_points > 7) ? 2 : 1;
66 {
67 int selected_image_num = 1;
68 IplImage* selected_image = NULL;
69 IplImage* images[NUM_IMAGES];
70 IplImage* temp_image = NULL;
71 IplImage* result_image = NULL;
ImageReader.java (https://github.com/ptII/ptII.git) Java · 119 lines
28 package ptolemy.actor.lib.opencv.javacv;
30 import static name.audet.samuel.javacv.jna.highgui.cvLoadImage;
31 import name.audet.samuel.javacv.jna.cxcore.IplImage;
96 String pathNameString = pathName.getExpression();
97 if (_image == null) {
98 _image = cvLoadImage(pathNameString, 1);
99 if (_image == null) {
100 throw new IllegalActionException(this, "Fail to load image "
116 //// private variables ////
118 private IplImage _image;
119 }
cvtest2.c (https://github.com/i03nomura1y/Sample.git) C · 75 lines
15 float range_0[] = { 0, 256 };
16 float *ranges[] = { range_0 };
17 IplImage *src_img = 0, *dst_img[4] = { 0, 0, 0, 0 }, *hist_img;
18 CvHistogram *hist;
20 // 画像ロード
21 if(argc < 2 ||
22 (src_img = cvLoadImage(argv[1], CV_LOAD_IMAGE_ANYCOLOR)) == 0){
23 fprintf(stderr,"Usage: $ %s img_file\n",argv[0]);
24 return -1;
eigenfacerecognizer.cpp (https://gitlab.com/CarlosRA97/visual-control) C++ · 224 lines
92 //allocate space for an IplImage array
93 images = (IplImage **) cvAlloc(sizeof(IplImage *) * numTrainedImages);
95 int currentImage = 0;
97 for(StringMap::iterator current = trainingImages.begin(); current != trainingImages.end(); ++current)
98 {
99 images[currentImage] = cvLoadImage(current->first.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
101 if(images[currentImage] == NULL) break;
135 eigenVectors = (IplImage**)cvAlloc(sizeof(IplImage*) * numEigenvalues);
137 for(int i = 0; i < numEigenvalues; i++)
169 //float * projectedTestFace = 0;
171 IplImage faceToRecognize = (IplImage) face;
172 //IplImage *faceToRecognize = cvLoadImage("s1/1.pgm", CV_LOAD_IMAGE_GRAYSCALE);
calcsurf.cpp (https://github.com/makerere-compute/ocula.git) C++ · 67 lines
morphology.c (https://gitlab.com/Ruggero/SparkEngine_Desktop) C · 130 lines
watershed.cpp (https://github.com/siegleal/iSanta.git) C++ · 147 lines
10 #endif
12 IplImage* marker_mask = 0;
13 IplImage* markers = 0;
14 IplImage* img0 = 0, *img = 0, *img_gray = 0, *wshed = 0;
15 CvPoint prev_pt = {-1,-1};
42 CvRNG rng = cvRNG(-1);
44 if( (img0 = cvLoadImage(filename,1)) == 0 )
45 return 0;
90 int i, j, comp_count = 0;
91 //cvSaveImage( "wshed_mask.png", marker_mask );
92 //marker_mask = cvLoadImage( "wshed_mask.png", 0 );
93 cvFindContours( marker_mask, storage, &contours, sizeof(CvContour),
94 CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE );
CVImgUtils.cpp (https://code.google.com/p/plinth-engine/) C++ · 156 lines
97 cv::cvtColor(temp, dimg, CV_RGB2BGR);
98 cv::flip(dimg, dimg2, 0);
99 IplImage bla = dimg2;
100 LOG(logDEBUG) << "Got this far... " << temp.rows << "x" << temp.cols;
101 //cv::imwrite(fn, temp);
112 cv::mixChannels(&temp, 1, &dimg, 1, fromTo, 3);
113 cv::flip(dimg, dimg2, 0);
114 IplImage bla = dimg2;
115 LOG(logDEBUG) << "Got this far... " << temp.rows << "x" << temp.cols;
116 //cv::imwrite(fn, temp);
135 SimpleImage* CVImgUtils::loadImage(std::string fn)
136 {
137 IplImage* tempImg = cvLoadImage(fn.c_str());
138 cv::Mat loadIm(tempImg); // = cv::imread(fn);
139 cv::Mat dimg(loadIm.size(), CV_8UC3);
Period.java (https://bitbucket.org/yan_chen/pc-image-processing.git) Java · 129 lines
extrinsic.cc (https://github.com/AsherBond/MondocosmOS.git) C++ · 78 lines
facedetect.cpp (https://github.com/usmanghani/Misc.git) C++ · 39 lines
2 #include "facedetect.h"
4 vector<RECT> facedetect (IplImage* image, CvHaarClassifierCascade* cascade)
5 {
6 //CvHaarClassifierCascade* cascade = (CvHaarClassifierCascade*)cvLoad(classifierfilename);
7 //IplImage* image = cvLoadImage(imagefilename);
8 CvMemStorage* storage = cvCreateMemStorage ( );
9 vector<RECT> list;
ConvNet.cpp (https://github.com/eldog/fface.git) C++ · 63 lines
process_test.cpp (http://marine-detection.googlecode.com/svn/trunk/) C++ · 200 lines
64 CvSize imgSize;
65 char c;
66 IplImage *tempBuf=0;
67 IplImage *in_image;
68 IplImage *processed_image;
70 int nelems;
108 //nelems = fread(in_image, (size_t)1, (size_t)IMAGE_SIZE, in_file);
110 tempBuf=cvLoadImage( filename, 1 );
111 imgSize=cvGetSize(tempBuf);
112 in_image = cvCreateImage(imgSize,IPL_DEPTH_8U,3);
ch3_ex3_13.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 76 lines
31 int main(int argc, char** argv)
32 {
33 IplImage* interest_img;
34 CvRect interest_rect;
35 if( argc == 7 && ((interest_img=cvLoadImage(argv[1],1)) != 0 ))
41 int add = atoi(argv[6]);
43 // Assuming IplImage *interest_img; and
44 // CvRect interest_rect;
45 // Use widthStep to get a region of interest
47 // (Alternate method)
48 //
49 IplImage *sub_img = cvCreateImageHeader(
50 cvSize(
51 interest_rect.width,
ipl.cpp (https://github.com/rodrigob/cudatemplates.git) C++ · 68 lines
31 Unlike e.g. ITK, OpenCV does not take care of handling the image
32 data with e.g. shared pointers and there the user has to be sure to
33 delete the constructed IplImage and the cudatemplates
34 representation of it in the right order.
35 */
40 try {
41 // read test input image (grayscale mode)
42 IplImage* image_input = cvLoadImage( "cameraman.png", 0);
44 // create reference to IplImage for use with CUDA classes:
47 // create empty Ipl output image:
48 IplImage* image_output = cvCreateImage( cvGetSize(image_input) , image_input->depth,
49 image_input->nChannels );
fisheye.cpp (https://github.com/aiwenar/Eyes.git) C++ · 132 lines
10 void sampleImage(const IplImage* arr, double idx0, double idx1, CvScalar& res)
11 {
12 if(idx0<0 || idx1<0 || idx0>(cvGetSize(arr).height-1) || idx1>(cvGetSize(arr).width-1)){
73 int mane(int argc, char** argv)
74 {
75 IplImage* src = cvLoadImage( argv[1], 1 );
76 IplImage* dst = cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
77 IplImage* dst2 = cvCreateImage(cvGetSize(src),src->depth,src->nChannels);
78 double K=atof(argv[3]);
79 double centerX=atoi(argv[4]);
cvtest.c (https://github.com/i03nomura1y/Sample.git) C · 47 lines
ch3_ex3_14.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 55 lines
combine.cc (https://github.com/aldonline/node-nativeimage.git) C++ · 52 lines
12 // load all images
13 IplImage* img0 = cvLoadImage( path1 );
14 IplImage* img1 = cvLoadImage( path2 );
15 IplImage* img2 = cvLoadImage( path3 );
16 IplImage* img3 = cvLoadImage( path4 );
23 // create destination image, half the size of the full-size montage
24 IplImage* img = cvCreateImage( cvSize(w/2, h/2), 8, 3 );
26 // copy+resize each image onto destination
pyramid_segmentation.c (https://github.com/siegleal/iSanta.git) C · 102 lines
edge.c (https://gitlab.com/juan-cardelino/misc_projects) C · 70 lines
ImageIO.cs (https://github.com/dajuric/dot-imaging.git) C# · 626 lines
33 private unsafe static IImage load(string fileName, ImageLoadType imageLoadType)
34 {
35 var iplImagePtr = CvInvoke.cvLoadImage(fileName, imageLoadType);
36 var image = (*iplImagePtr).AsImage((_) =>
93 public unsafe static bool TrySave(IImage image, string fileName)
94 {
95 IplImage iplImage = default(IplImage);
96 try
97 {
98 iplImage = image.AsCvIplImage();
99 }
100 catch
116 where TColor : unmanaged, IColor
117 {
118 var iplImage = image.AsCvIplImage();
119 CvInvoke.cvSaveImage(fileName, &iplImage, IntPtr.Zero);
latentsvmdetect.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 104 lines
fitellipse.c (https://github.com/siegleal/iSanta.git) C · 152 lines
generic_descriptor_match.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 98 lines
15 }
17 IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1, IplImage* img2,
18 const vector<KeyPoint>& features2, const vector<DMatch>& desc_idx);
40 //printf("Reading the images...\n");
41 IplImage* img1 = cvLoadImage(img1_name.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
42 IplImage* img2 = cvLoadImage(img2_name.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
61 printf("Done\n");
63 IplImage* img_corr = DrawCorrespondences(img1, keypoints1, img2, keypoints2, matches2to1);
65 cvNamedWindow("correspondences", 1);
72 }
74 IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1, IplImage* img2,
75 const vector<KeyPoint>& features2, const vector<DMatch>& desc_idx)
76 {
pyramid_segmentation.c (https://github.com/siegleal/iSanta.git) C · 100 lines
simpletest.cpp (https://github.com/jcbolor/libdecodeqr.git) C++ · 70 lines
FaceRecognition.java (https://gitlab.com/Ap00rvSaxena/FaceRecognition-in-E-Attendance) Java · 51 lines
3 //import com.googlecode.javacv.cpp.opencv_contrib.FaceRecognizer;
4 //import com.googlecode.javacv.cpp.opencv_core.IplImage;
5 //import com.googlecode.javacv.cpp.opencv_core.MatVector;
6 import java.awt.image.BufferedImage;
7 import static org.bytedeco.javacpp.opencv_core.IPL_DEPTH_8U;
8 import org.bytedeco.javacpp.opencv_core.IplImage;
9 import org.bytedeco.javacpp.opencv_core.MatVector;
10 import org.bytedeco.javacpp.opencv_face.FaceRecognizer;
19 public void checkFace(String imagePath, BufferedImage frame) {
20 // Video Camera Frame
21 IplImage getVCFrame = new IplImage();
22 getVCFrame = IplImage.createFrom(frame);
39 labels[0] = label;
41 IplImage GrayVCFrame = IplImage.create(getVCFrame.width(), getVCFrame.height(), IPL_DEPTH_8U, 1);
VideoChatFrameSaveTest.java (https://github.com/oimchat/oim-fx.git) Java · 162 lines
107 String saveMp4name = "Temp/f1.flv"; // 保存的视频名称
108 FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(saveMp4name, 640, 480);
109 OpenCVFrameConverter.ToIplImage conveter = new OpenCVFrameConverter.ToIplImage();
110 long time = 0;
111 boolean has = false;
139 }
140 Frame frame = cameraVideoPanel.getFrame();
141 //IplImage image = conveter.convert(frame);
142 recorder.record(frame);
143 // 释放内存? cvLoadImage(fname); // 非常吃内存!!
ch3_ex3_11.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 53 lines
test-surf-sim.cpp (https://github.com/sileht/debbot-seeks-experimental.git) C++ · 60 lines
ImageLoader.cpp (https://github.com/p1r4nh4/CellTrack.git) C++ · 63 lines
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 46 lines
9 #include <opencv/highgui.h>
10 // aperture 光圈
11 IplImage* canny(IplImage *inputImage,float lowThresh,float highThresh,float aperture){
12 IplImage *outputImage;
21 int main(int args,char *argv[]){
22 IplImage *inputImage;
23 IplImage *outputImage;
30 assert(argv[1]);
31 // 只有灰度图才可以canny
32 inputImage = cvLoadImage(argv[1],CV_LOAD_IMAGE_GRAYSCALE);
33 cvShowImage("inputImage",inputImage);
34 // float lowThresh 内部轮廓。数字越大越模糊
match.cpp (https://github.com/cherip/Harris.git) C++ · 30 lines
12 }
14 IplImage *img = cvLoadImage(argv[1]);
15 IplImage *img2 = cvLoadImage(argv[2]);
20 threshold = 0.03;
22 // IplImage *derivX = derivateX(img);
23 // IplImage *derivY = derivateY(img);
24 // IplImage *harr = harris(img, threshold);
25 IplImage *ans1 = harris_laplace(img, 0.03);
26 IplImage *ans2 = harris_laplace(img2, 0.03);
28 IplImage *print = stack_imgs(ans1, ans2);
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 64 lines
11 int main(int argc,char **argv) {
12 // init
13 IplImage *srcImage;
14 IplImage *jiandanImage;
15 IplImage *jiandanwuImage;
16 IplImage *zhongzhiImage;
17 IplImage *gaosiImage;
18 IplImage *shuangbianImage;
25 // validate
26 assert(argv[1]);
27 srcImage = cvLoadImage(argv[1],CV_LOAD_IMAGE_ANYCOLOR);
28 cvShowImage("srcImage",srcImage);
29 // 简单模糊
CvvImage.cpp (https://github.com/cqswzqcj/MFCShowVideoTest.git) C++ · 312 lines
116 if( !m_img || Bpp() != bpp || m_img->width != w || m_img->height != h )
117 {
118 if( m_img && m_img->nSize == sizeof(IplImage))
119 Destroy();
141 #define HG_IS_IMAGE(img) \
142 ((img) != 0 && ((const IplImage*)(img))->nSize == sizeof(IplImage) && \
143 ((IplImage*)img)->imageData != 0)
166 bool CvvImage::Load( const char* filename, int desired_color )
167 {
168 IplImage* img = cvLoadImage( filename, desired_color );
169 if( !img )
170 return false;
182 if( r.width < 0 || r.height < 0 ) return false;
184 IplImage* img = cvLoadImage( filename, desired_color );
185 if( !img )
186 return false;
RenderUtils.cpp (http://buglearn.googlecode.com/svn/trunk/) C++ · 160 lines
49 char* pixels = (char*)malloc( thesize );
50 glReadPixels( 0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, pixels );
51 IplImage* img = cvCreateImage( cvSize(w,h), IPL_DEPTH_8U, 3 );
52 cvZero(img);
53 int step = img->widthStep/sizeof(uchar);
133 char buff[32];
134 char frm[8];
135 IplImage* ReadImgByNum(const string& basename, const string& end, int iFrame, int numChars) {
155 filename.append(end);
157 IplImage* img = cvLoadImage( filename.c_str() );
158 return img;
colorFill.py (http://mvh-source.googlecode.com/svn/trunk/) Python · 130 lines
sobel_test.cpp (https://gitlab.com/B3h3m0th/ccv) C++ · 30 lines
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 56 lines
10 // 处理饱和度
11 void saturation(IplImage *inputImage,int value){
12 for(int y=0;y<inputImage->height;y++){
13 // 从图像的内存开始(inputImage->imageDate) 跨幅(y*inputImage->widthStep)
23 }
24 // 提取区域图像
25 IplImage* getsubimage(IplImage *inputImage,CvRect interest_rect){
26 IplImage *sub_img = cvCreateImageHeader(cvSize(interest_rect.width,interest_rect.height),inputImage->depth,inputImage->nChannels);
34 int main(int args,char *argv[]){
35 IplImage *oneimage;
36 cvNamedWindow("saturation",CV_WINDOW_AUTOSIZE);
37 //
38 assert(argv[1]);
39 //
40 oneimage = cvLoadImage(argv[1],CV_LOAD_IMAGE_ANYCOLOR);
41 CvRect rect = cvRect(30,30,280,280);
42 // 设置感兴趣区域,只对这部分。设置后之对这部分处理 需要调用OpenCV系统函数.也不是所有的OpenCV函数都会处理ROI 下面注释区域为 系统函数。调用时候需要注掉saturation(oneimage,-50);
ImagingTest.cc (https://gitlab.com/biometricscurious/easyeye) C++ · 63 lines
30 }
32 void Describe(ostream& out, string name, IplImage* image)
33 {
34 out << name << ' ' << image->width << 'x' << image->height << endl;
44 * This test is obsolete now that we removed ImageUtility.h
45 */
46 // IplImage* ipl = cvLoadImage("../testdata/images/green-rectangle.png", CV_LOAD_IMAGE_GRAYSCALE);
47 // Mat mat = cv::imread("../testdata/images/green-rectangle.png", CV_LOAD_IMAGE_GRAYSCALE);
48 //
50 // Describe(cerr, "mat", mat);
51 //
52 // IplImage* ipl_roi = ImageUtility::getROIImage(ipl, 100, 150, 100, 150);
53 // Mat mat_roi = Imaging::GetROI(mat, 100, 150, 100, 150);
54 //
main.cpp (https://github.com/Matrixian/CFBH-Robotics.git) C++ · 46 lines
run_meanshift_test.cpp (https://github.com/ipa320/cob_object_perception.git) C++ · 86 lines
17 void run_meanshift_test::run_test(cv::Mat* image, cv::Mat depth, std::vector < std::vector<cv::Mat> >* regions)
18 {
19 //IplImage *img = cvLoadImage("/home/rmb-dh/obst.jpg");
20 IplImage *img = new IplImage(*image);
22 cv::Mat imageO = (*image).clone();
23 //IplImage *imgO = new IplImage(imageO);
trimming.c (https://github.com/shisful/Image-OpenCV.git) C · 71 lines
9 char *outputFileName;
10 PREINIT:
11 IplImage *src_img, *dst_img;
12 int sum_x, sum_y, x, y, count;
13 double variance_x, variance_y, avr_x, avr_y;
33 char text[64];
35 src_img = cvLoadImage (inputFileName, CV_LOAD_IMAGE_COLOR)
36 dst_img = cvCreateImage (cvSize (src_img->width, src_img->height), IPL_DEPTH_8U, 1);
37 cvCvtColor (src_img, dst_img, CV_BGR2GRAY);
face_alignment_test2.cpp (https://github.com/fateleak/FriggaVision.git) C++ · 126 lines
sansCamera.cpp (http://trait-im-terrainfoot.googlecode.com/svn/trunk/) C++ · 305 lines
20 void mouseCallback(int event, int x, int y, int flags, void* param);
21 double distance(CvPoint p1, CvPoint p2);
22 void dessinerDistance(IplImage *& img, int rayon, double d);
24 int main(int argc, char *argv[]) {
26 int height, width, step, channels;
27 uchar *data;
28 IplImage* img = 0;
30 if (argc < 2) {
35 // load an image
36 img = cvLoadImage(argv[1], 1);
37 if (!img) {
38 printf("Could not load image file: %s\n", argv[1]);
ComponentBinaryMask.cpp (https://github.com/roboshepherd/swistrackplus.git) C++ · 107 lines
28 wxFileName filename = mCore->GetProjectFileName(filename_string);
29 if (filename.IsOk()) {
30 mMaskImage = cvLoadImage(filename.GetFullPath().mb_str(wxConvFile), CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
31 }
32 if (! mMaskImage) {
38 if (mMaskImage->nChannels == 3) {
39 // BGR case, we convert to gray
40 IplImage *img = cvCreateImage(cvSize(mMaskImage->width, mMaskImage->height), mMaskImage->depth, 1);
41 cvCvtColor(mMaskImage, img, CV_BGR2GRAY);
42 cvReleaseImage(&mMaskImage);
46 } else {
47 // Other cases, we take the first channel
48 IplImage *img = cvCreateImage(cvSize(mMaskImage->width, mMaskImage->height), mMaskImage->depth, 1);
49 cvCvtPixToPlane(mMaskImage, img, NULL, NULL, NULL);
50 cvReleaseImage(&mMaskImage);
EdgeDetect.c (https://github.com/shisful/Image-OpenCV.git) C · 34 lines
dt_box.cpp (https://github.com/metalbubble/CAM.git) C++ · 258 lines
main.cpp (http://hppg.googlecode.com/svn/trunk/) C++ · 213 lines
myimage.cpp (https://github.com/rayban/UchiyaMarkers.git) C++ · 123 lines
ch3_ex3_12.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 53 lines
cvcropimageroi.cpp (http://opencvx.googlecode.com/svn/trunk/) C++ · 58 lines
main.c (https://github.com/ginrou/motion-deblur.git) C · 73 lines
15 int main(int argc, char* argv[] ){
17 IplImage *original = cvLoadImage( argv[1], CV_LOAD_IMAGE_GRAYSCALE);
18 IplImage *buf = cvLoadImage( argv[2], CV_LOAD_IMAGE_GRAYSCALE);
19 IplImage *captured;
21 CvSize imgSize = cvSize( 320, 320 );
28 else{
29 CvMat* psf = cvCreateMat( psfSize, psfSize , CV_32FC1);
30 IplImage* tmp = cvCreateImage( cvSize( psfSize, psfSize), IPL_DEPTH_8U, 1);
31 cvResize( buf, tmp, CV_INTER_AREA);
32 cvConvert( tmp, psf );
41 MotionDBL *mdbl = createMotionDBLStruct( captured, cvSize( psfSize, psfSize ));
42 solveMotionDeblurring(mdbl);
43 IplImage *dst = cvCreateImage( cvGetSize(captured), IPL_DEPTH_8U, 1);
44 cvConvertScale( mdbl->original, dst, 256.0, 0.0);
45 cvSaveImage( argv[3], dst, 0);
loadimg.c (https://github.com/SteveClement/privateface.git) C · 45 lines
ComponentColorMask.cpp (https://github.com/roboshepherd/swistrackplus.git) C++ · 104 lines
28 wxFileName filename = mCore->GetProjectFileName(filename_string);
29 if (filename.IsOk()) {
30 mMaskImage = cvLoadImage(filename.GetFullPath().mb_str(wxConvFile), CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
31 }
32 if (! mMaskImage) {
40 } else if (mMaskImage->nChannels == 1) {
41 // Grayscale image, we convert to BGR
42 IplImage *img = cvCreateImage(cvSize(mMaskImage->width, mMaskImage->height), mMaskImage->depth, 3);
43 cvCvtColor(mMaskImage, img, CV_GRAY2BGR);
44 cvReleaseImage(&mMaskImage);
main.cpp (https://github.com/ducha-aiki/mods.git) C++ · 118 lines
ComponentOutputFramesImages.h (https://github.com/roboshepherd/swistrackplus.git) C Header · 44 lines
circledetect.cpp (https://github.com/jlsync/detector.git) C++ · 59 lines
main.cpp (https://github.com/gulimujyujyu/xlzhuathku_depthcolor.git) C++ · 41 lines
Fl_OpenCV.cxx (https://gitlab.com/BGCX067/fads-svn-to-git) C++ · 347 lines
6 IplImage *fl_LoadImage(char*filename,int iscolor)
7 {
8 IplImage *cd,*image;
9 if( (cd = cvLoadImage(filename, iscolor)) == 0 ){
10 fl_alert("Image not opened !");
11 return NULL;
33 }
35 bool fl_SaveImage(char*filename,IplImage *image)
36 {
37 if(image->nChannels==3){
130 }
132 void Fl_OpenCV::SetImage(IplImage *nimage)
133 {
134 if(image)
cvHoughCircles.cpp (https://github.com/yourtion/LearningOpenCV.git) C++ · 32 lines
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 53 lines
10 int main(int args,char *argv[]){
11 assert(argv[1]);
12 IplImage *matTmage = cvLoadImage(argv[1],CV_LOAD_IMAGE_ANYCOLOR);
13 IplImage *readTmage;
42 printf("one:%d,two:%d,three:%d\n",one,two,three);
43 // 读取矩阵数据
44 readTmage = (IplImage*)cvReadByName(fs2,NULL,"dataIt");
45 cvShowImage("viewSeriableImage",readTmage);
46 cvReleaseFileStorage(&fs2);
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 75 lines
25 double roation = 45.0;
26 // 加载图
27 IplImage *image = 0;
28 // 缩放后图片
29 IplImage *targetImage = 0;
30 // 旋转后的图片
31 IplImage roatationImage;
32 // ----------
33 // 验证
44 cvMoveWindow("rotationtarget",300,300);
45 // 加载图片
46 image = cvLoadImage(argv[1],CV_LOAD_IMAGE_COLOR);
47 if(!image){
48 printf("image can't load");
main.cpp (https://bitbucket.org/realhidden/multimediaeval.git) C++ · 46 lines
resample_test.cpp (https://gitlab.com/B3h3m0th/ccv) C++ · 28 lines
final.c (https://hg.codeplex.com/empty7) C · 138 lines
TemplateMatching.java (https://gitlab.com/cvtung/javacv) Java · 80 lines
23 int height = Integer.parseInt(args[4]);
25 IplImage src = cvLoadImage(
26 args[0], 0);
27 IplImage tmp = cvLoadImage(
28 args[1], 0);
30 IplImage result = cvCreateImage(
31 cvSize(src.width() - tmp.width() + 1,
32 src.height() - tmp.height() + 1), IPL_DEPTH_32F, src.nChannels());
66 rect.height(tmp.width() + height);
67 cvSetImageROI(src, rect);
68 IplImage imageNew = cvCreateImage(cvGetSize(src), src.depth(),
69 src.nChannels());
70 cvCopy(src, imageNew);
main.cpp (https://github.com/twelly/OpenCV.git) C++ · 30 lines
Graber.cpp (https://gitlab.com/BGCX067/eyemouse-svn-to-git) C++ · 258 lines
72 {
73 cout<<"source file:"<< m_szFileName<<endl;
74 m_pFrame = cvLoadImage( m_szFileName, 1 );
75 if( !m_pFrame )
76 throw "loading image file fail!";
138 cvResetImageROI(m_pFrameCopy);
140 IplImage *tmp;
141 tmp = m_pPrevGrayFrame;
142 m_pPrevGrayFrame = m_pGrayFrame;
170 }
171 //============================================================================
172 IplImage * CGraber::getFrameEqualizeHist()
173 {
174 if (! m_bFrameEqualizeHistComputed)
loadsave_new.cpp (https://github.com/Golangltd/codeclass.git) C++ · 375 lines
60 // ----------------------------------------------------------------------------
62 static IplImage* icvDecodeJpg(const std::string& data, int iscolor)
63 {
64 int channels = iscolor? 3: 1;
304 CV_IMPL
305 IplImage* cvLoadImage( const char* filename, int iscolor )
306 {
307 if(!filename || !filename[0]) {
344 return 0;
345 }
346 IplImage* img = (IplImage*)arr;
347 std::string data;
edge.c (https://github.com/siegleal/iSanta.git) C · 68 lines
hello.cpp (https://github.com/xushiwei/winx.git) C++ · 94 lines
ui-cvimage.c (https://gitlab.com/BGCX067/eyetracker-svn-to-git) C · 186 lines
31 }
33 ui_widget *ui_newcvimagefrom( char *name, IplImage *source, int depth, int channels ) {
34 ui_widget *widget = ui_newcvimage( name, source->width, source->height, source->depth, source->nChannels );
41 ui_widget *ui_newcvimageload( char *name, char *path ) {
42 ui_cvimage *image = (ui_cvimage *)malloc( sizeof( ui_cvimage ) );
43 image->image = cvLoadImage( (const char *)path, CV_LOAD_IMAGE_UNCHANGED );
45 ui_widget *widget = ui_newwidget( name, UI_CVIMAGE_TYPE, image );
68 ui_cvimage *image = UI_CAST_CVIMAGE( widget );
69 if( !image ) return;
70 IplImage *tconv = NULL;
72 int bpp = image->image->depth * image->image->nChannels;
match.c (git://github.com/gamman/MRPT.git) C · 123 lines
36 int main( int argc, char** argv )
37 {
38 IplImage* img1, * img2, * stacked;
39 struct feature* feat1, * feat2, * feat;
40 struct feature** nbrs;
44 int n1, n2, k, i, m = 0;
46 img1 = cvLoadImage( img1_file, 1 );
47 if( ! img1 )
48 fatal_error( "unable to load image from %s", img1_file );
49 img2 = cvLoadImage( img2_file, 1 );
50 if( ! img2 )
51 fatal_error( "unable to load image from %s", img2_file );
FaceDetection.cpp (https://github.com/wyrover/book-code.git) C++ · 78 lines
10 static CvMemStorage* storage = 0;
12 void detect_and_draw( IplImage* image );
13 const char* cascade_name ="haarcascade_frontalface_alt.xml"; //Ҫõķ
24 cvNamedWindow( "result", 1 );
25 const char* filename = "lena.jpg"; //ͼ
26 IplImage* image = cvLoadImage( filename, 1 ); //����ͼ��
27 detect_and_draw( image ); //Լصͼм
28 cvWaitKey(0);
32 }
34 void detect_and_draw( IplImage* img )
35 {
36 static CvScalar colors[] =
Camera.cpp (https://github.com/CognitiveRobotics/object_tracking_2D.git) C++ · 179 lines
18 ss << m_strImgPath << /*"/" << /*"img" << */std::setw(5) << std::setfill('0') << m_nImgIdx << "." << img_ext_;
19 std::cout<<ss.str().c_str()<<std::endl;
20 IplImage* image = cvLoadImage(ss.str().c_str(), color_ ? CV_LOAD_IMAGE_COLOR : CV_LOAD_IMAGE_GRAYSCALE);
21 width_ = image->width;
22 height_ = image->height;
139 video_capture_.retrieve(bgrImage, CV_CAP_OPENNI_BGR_IMAGE);
140 IplImage* frame = new IplImage(bgrImage);
141 cvCopy(frame, img_input_);
142 }
166 if(verbose_) std::cout << "Load image: " << ss.str() << std::endl;
167 // Read an image from the saved image sequence
168 IplImage* image = cvLoadImage(ss.str().c_str(), color_ ? CV_LOAD_IMAGE_COLOR : CV_LOAD_IMAGE_GRAYSCALE);
169 // Read edge image if there are edge images in the same folder. (e.g. Berkeley edges, scale space edges)
170 // If there are no edge images, 'img_edge_' would be NULL
ComponentBackgroundSubtractionGray.cpp (https://github.com/roboshepherd/swistrackplus.git) C++ · 125 lines
29 wxFileName filename = mCore->GetProjectFileName(filename_string);
30 if (filename.IsOk()) {
31 mBackgroundImage = cvLoadImage(filename.GetFullPath().mb_str(wxConvFile), CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
32 }
33 if (! mBackgroundImage) {
71 void THISCLASS::OnStep() {
72 // Get and check input image
73 IplImage *inputimage = mCore->mDataStructureImageGray.mImage;
74 if (! inputimage) {
75 AddError(wxT("No input image."));
main.cpp (https://github.com/OpenGenus/cosmos.git) C++ · 162 lines
OpenCVUtils.cpp (https://github.com/foreverYoungGitHub/CascadeCNN.git) C++ · 208 lines
15 if(!strcmp(info->type_name, CV_TYPE_NAME_IMAGE)){
16 CvScalar s;
17 IplImage *I = (IplImage *)M;
18 for(int i=0; i< I->height; i++){
19 for(int j=0; j< I->width; j++){
178 #ifdef _WIN32
179 IplImage *img = cvLoadImage(fileName, useColorImage);
180 #else
181 // check the extension for jpg files; OpenCV has issues with reading jpg files.
193 system(sysCommand.c_str());
195 IplImage *img = cvLoadImage(tmpPPMFile.c_str(), useColorImage);
196 if(img == NULL)
197 {
openCVJpegIO.cpp (http://overlapping-object-recognition.googlecode.com/svn/trunk/) C++ · 114 lines
4 void JpegIO::write(ColorImage* img, char* savePath){
5 //cout << "Pisem " << savePath << endl;
6 IplImage * pRGBImg = 0;
7 pRGBImg = cvCreateImage
8 ( cvSize(img->getWidth(),img->getHeight() ),
22 void JpegIO::write(GrayImage* img, char* savePath){
24 IplImage * pGrayImg = 0;
25 pGrayImg = cvCreateImage
26 ( cvSize(img->getWidth(),img->getHeight() ),
37 ColorImage* JpegIO::read(char* imgPath){
38 //cout << "Ucitavam " << imgPath << endl;
39 IplImage * pRGBImg = 0;
41 // Load the RGB image from file
Histogrem-EMD.cpp (https://github.com/yourtion/LearningOpenCV.git) C++ · 134 lines
15 IplImage *src1, *src2;
17 if (argc == 3 && ((src1 = cvLoadImage(argv[1], 1)) != 0) && ((src2 = cvLoadImage(argv[2], 1)) != 0)) {
19 // HSV image and decompose into separate planes
21 IplImage* hsv1 = cvCreateImage( cvGetSize(src1), 8, 3 );
22 cvCvtColor( src1, hsv1, CV_BGR2HSV);
25 IplImage* h_plane1 = cvCreateImage( cvGetSize(src1), 8, 1 );
26 IplImage* s_plane1 = cvCreateImage( cvGetSize(src1), 8, 1 );
27 IplImage* v_plane1 = cvCreateImage( cvGetSize(src1), 8, 1 );
28 IplImage* planes1[] = { h_plane1, s_plane1 };
29 cvCvtPixToPlane( hsv1, h_plane1, s_plane1, v_plane1, 0 );
hist_test.cpp (https://github.com/emmjaykay/stanford_self_driving_car_code.git) C++ · 123 lines
48 void rgbTest(IplImage* img) {
49 // -- Get RGB
50 IplImage* r = cvCreateImage( cvGetSize(img), 8, 1 );
51 IplImage* g = cvCreateImage( cvGetSize(img), 8, 1 );
52 IplImage* b = cvCreateImage( cvGetSize(img), 8, 1 );
59 int sizes[] = {num_bins, num_bins};
60 CvHistogram* hist = cvCreateHist(2, sizes, CV_HIST_ARRAY, ranges, 1);
61 IplImage* imgs[] = {r, g};
63 // -- Compute.
82 return 1;
83 }
84 IplImage* img = cvLoadImage(argv[1]);
85 if(!img) {
86 cout << "Could not load image." << endl;
CvvImage.cpp (https://github.com/ArcJonSnow/Demo_for_Windows.git) C++ · 258 lines
100 if (!m_img || Bpp() != bpp || m_img->width != w || m_img->height != h)
101 {
102 if (m_img && m_img->nSize == sizeof(IplImage))
103 Destroy();
104 /* prepare IPL header */
118 }
119 #define HG_IS_IMAGE(img) \
120 ((img) != 0 && ((const IplImage*)(img))->nSize == sizeof(IplImage) && \
121 ((IplImage*)img)->imageData != 0)
138 bool CvvImage::Load(const char* filename, int desired_color)
139 {
140 IplImage* img = cvLoadImage(filename, desired_color);
141 if (!img)
142 return false;
152 if (r.width < 0 || r.height < 0) return false;
154 IplImage* img = cvLoadImage(filename, desired_color);
155 if (!img)
156 return false;
main.cpp (https://github.com/maxn7/OpenCV.git) C++ · 77 lines
morphology.c (https://github.com/BynreForest/FaceDetection.git) C · 110 lines
DesktopSaveTest.java (https://github.com/oimchat/oim-fx.git) Java · 161 lines
16 import org.bytedeco.javacpp.avcodec;
17 import org.bytedeco.javacpp.avutil;
18 import org.bytedeco.javacpp.opencv_core.IplImage;
19 import org.bytedeco.javacv.FFmpegFrameRecorder;
20 import org.bytedeco.javacv.Frame;
24 import com.oim.common.system.ClientRobot;
25 import static org.bytedeco.javacpp.opencv_imgcodecs.cvLoadImage;
26 public class DesktopSaveTest extends JFrame {
99 String saveMp4name = "Temp/f1.mp4"; // 保存的视频名称
100 FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(saveMp4name, 1920, 1080);
101 OpenCVFrameConverter.ToIplImage conveter = new OpenCVFrameConverter.ToIplImage();
102 Java2DFrameConverter converter = new Java2DFrameConverter();
103 long time = 0;
136 //IplImage..createFrom(img);
137 //IplImage image = cvLoadImage("");
138 Frame frame = converter.convert(img);
139 // IplImage image = conveter.convert(frame);
main.cpp (https://github.com/itrufeng/learncv.git) C++ · 36 lines
8 #include <opencv/highgui.h>
10 IplImage* scaleImage(IplImage *inputImage,float scale){
11 IplImage *outputImage = cvCreateImage(cvSize(inputImage->width*scale,inputImage->height*scale),inputImage->depth,3);
14 }
15 int main(int args,char *argv[]){
16 IplImage *inputImage;
17 IplImage *outputImage;
22 //
23 assert(argv[1]);
24 inputImage = cvLoadImage(argv[1],CV_LOAD_IMAGE_COLOR);
25 outputImage = scaleImage(inputImage,0.5);
26 cvShowImage("inputImage",inputImage);