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);

13

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);

166

167 // check results of itk::Image -> IplImage

279 // Test itk::Image -> IplImage

280 //

281 IplImage* outIpl = itk::OpenCVImageBridge::ITKImageToIplImage< ImageType >(baselineImage);

282

283 // check results of itk::Image -> IplImage

284 IplImage* dataConvertedInIpl = ConvertIplImageDataType<ValueType>(inIpl);

285 double itkIplDiff = cvNorm(outIpl, dataConvertedInIpl);

286

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;

28

29 /**

42

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

72

73 // source

74 m_source = cvLoadImage(filename, 1);

75 // gray

76 m_gray = cvCreateImage(cvGetSize(m_source), 8, 1);

181 exec();

182 }

183 bool Vshader::initial(IplImage* img, IplImage* _edge)

184 {

185 if(img == NULL || _edge == NULL)

one_way_sample.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 119 lines

26 using namespace cv;

27

28 IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1, IplImage* img2,

29 const vector<KeyPoint>& features2, const vector<int>& desc_idx);

30

46

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");

83

84 IplImage* img_corr = DrawCorrespondences(img1, keypoints1, img2, keypoints2, desc_idx);

85

86 cvNamedWindow("correspondences", 1);

93 }

94

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"

4

5 int PxCount(IplImage *PxC);

6

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

27

filter.cc (https://github.com/vbajpai/imagefilters.git) C++ · 290 lines

9 IplImage* src;

10 IplImage* dst;

11

12 public:

18 }

19

20 void setSource(IplImage *img){src = img;}

21

22 IplImage* doBlur(){

74

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){

177

178 IplImage* img = cvLoadImage(filename.c_str(), CV_LOAD_IMAGE_UNCHANGED);

179 if (img!=NULL){

180

HoughLines.java (https://bitbucket.org/cagcontactor/jcurious.git) Java · 116 lines

22

23 String fileName = args.length >= 1 ? args[0] : "pic1.png"; // if no params provided, compute the defaut image

24 IplImage src = cvLoadImage(fileName, 0);

25 IplImage dst;

26 IplImage colorDst;

27 CvMemStorage storage = cvCreateMemStorage(0);

28 CvSeq lines = new CvSeq();

myBWlabel.cpp (https://github.com/ipa320/autopnp.git) C++ · 164 lines

7 using namespace std;

8

9 int myLabel(IplImage* I,vector<CvPoint>* regions);

10

11 int main(){

12

13 IplImage* I = cvLoadImage("boxes2.jpg",0);

14 IplImage* labelled_img=cvCreateImage(cvSize(I->width,I->height),8,3);

55 }

56

57 int myLabel(IplImage* I,vector<CvPoint>* regions){

58

59 int height = I->height;

calibrate.cc (https://github.com/jehc/MondocosmOS.git) C++ · 139 lines

67

68

69 IplImage *img = cvLoadImage(images[0], CV_LOAD_IMAGE_GRAYSCALE);

70 IplImage *imgColor = cvCreateImage(cvGetSize(img), 8, 3);

87

88 for(int imagesLoaded = 0; imagesLoaded < loadImageCnt; imagesLoaded++) {

89 img = cvLoadImage(images[imagesLoaded], CV_LOAD_IMAGE_GRAYSCALE);

90

91 cvCvtColor(img, imgColor, CV_GRAY2BGR);

HoughLines.java (https://gitlab.com/cvtung/javacv) Java · 117 lines

21

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

99 IplImage *imAcqLoadImg(ImAcq *imAcq, char *path)

100 {

101 IplImage *image = cvLoadImage(path);

102

103 if(image == NULL)

110 }

111

112 IplImage *imAcqLoadFrame(ImAcq *imAcq, int fNo)

113 {

114 char path[255];

147 }

148

149 IplImage *imAcqGetImg(ImAcq *imAcq)

150 {

151

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));

94

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));

98

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 );

17

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);

31

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;

34

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

29

30 // Load the source image. HighGUI use.

31 IplImage *image02 = 0, *image03 = 0, *image04 = 0;

32

33 void process_image(int h);

38

39 // load image and force it to be grayscale

40 if( (image03 = cvLoadImage(filename, 0)) == 0 )

41 return -1;

42

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));

101

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));

105

125 \****************************************************************************************/

126

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

211

212 bool Material::loadTextureData(const char *textureFile, Texture &texture) {

213 IplImage *image = cvLoadImage(textureFile, CV_LOAD_IMAGE_COLOR);

214 if (image != NULL) {

215 texture.width = image->width;

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 }

68

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.

31 }

32

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);

199

200 IplImage* img=cvLoadImage(fullpath1,0);

201 IplImage* imgLBP=cvCreateImage( cvSize(img->width,img->height), 8, img->nChannels );

258 {

259

260 IplImage * img = cvLoadImage("abc.jpg",0);

261 int Nx = floor((img->width - 10)/10);

262 int Ny= floor((img->height - 10)/10);

pyramid_segmentation.c (https://gitlab.com/Ruggero/SparkEngine_Desktop) C · 99 lines

14 }

15

16 IplImage* image[2] = { 0, 0 }, *image0 = 0, *image1 = 0;

17 CvSize size;

18

51 filename = argc == 2 ? argv[1] : (char*)"fruits.jpg";

52

53 if( (image[0] = cvLoadImage( filename, 1)) == 0 )

54 {

55 help();

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);

56

61

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);

69

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

89 {

90 assert(argc == 3);

91 IplImage* image = cvLoadImage(argv[1]);

92 CvMat* gray = cvCreateMat(image->height, image->width, CV_8UC1);

93 CvMat* x = cvCreateMat(image->height - 4, image->width - 4, CV_32SC1);

houghlines.c (https://github.com/siegleal/iSanta.git) C · 62 lines

10 {

11 const char* filename = argc >= 2 ? argv[1] : "pic1.png";

12 IplImage* src = cvLoadImage( filename, 0 );

13 IplImage* dst;

14 IplImage* color_dst;

15 CvMemStorage* storage = cvCreateMemStorage(0);

16 CvSeq* lines = 0;

taller_5 (Felipe Navarro's conflicted copy 2012-05-30).cpp (https://bitbucket.org/ecivision/eci_3d_vision_project.git) C++ · 111 lines

22 void Taller_5::on_push_Gaussian_clicked()

23 {

24 IplImage *img1 = 0;

25 IplImage *img2 = 0;

39

40 /* load original image */

41 img1 = cvLoadImage( "hola.jpg", CV_LOAD_IMAGE_GRAYSCALE );

42

43

fundamental.cpp (https://github.com/joshuaeckroth/SURV-I.git) C++ · 394 lines

191 }

192

193 IplImage *east = cvLoadImage("../videos/plse1.png");

194 IplImage *west = cvLoadImage("../videos/plsw1.png");

361 }

362

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);

367

368 IplImage *east_trans_8bit = cvCreateImage(imgsize, east->depth, 1);

369 IplImage *west_trans_8bit = cvCreateImage(imgsize, west->depth, 1);

372

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;

66

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;

75

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;

155

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 );

20

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);

34

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) {

53

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

5 int main(int argc, char** argv)

6 {

7 IplImage* img = cvLoadImage("view_0002.png", 1);;

8 IplImage* gray = cvCreateImage(cvGetSize(img), 8, 1);

histogram_tut.cpp (https://bitbucket.org/iankits/opencv_development.git) C++ · 158 lines

39 }*/

40

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

159

160 BOOL CMycvProjectDoc::Load(IplImage** pp,LPCTSTR csFileName)

161 {

162 IplImage* pImg=NULL;

163

164

165 pImg = cvLoadImage(csFileName,-1); // ��ͼ���ļ�(DSCV)

166 if (!pImg){

167 AfxMessageBox("ͼʧܣͼʽ·Ƿȷ");

177 }

178

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];

71

image.c (https://bitbucket.org/leandromattioli/monnaie.git) C · 102 lines

17 */

18 Image image_create_from_file(char* filename) {

19 return cvLoadImage(filename, 1);

20 }

21

74 short int image_get_hsv_color_at(Image rgbImg, Color *hsv, int x, int y) {

75 int pixelPosition;

76 IplImage *hsvImg;

77 if(!image_valid_coords(rgbImg, x, y))

78 return 0;

latentsvmdetect.cpp (https://gitlab.com/Ruggero/SparkEngine_Desktop) C++ · 83 lines

19 int tbbNumThreads = -1;

20

21 static void detect_and_draw_objects( IplImage* image, CvLatentSvmDetector* detector, int numThreads = -1)

22 {

23 CvMemStorage* storage = cvCreateMemStorage(0);

57 }

58 }

59 IplImage* image = cvLoadImage(image_filename);

60 if (!image)

61 {

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);

41

42 IplImage img=null;

43 int counter = 0;

44 int label;

45

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

23

24 BufferedImage bimage1 = ImageIO.read(file1);

25 IplImage before = IplImage.createFrom(bimage1);

26

27 BufferedImage bimage2 = ImageIO.read(file2);

28 IplImage after = IplImage.createFrom(bimage2);

29

30

31 IplImage diff = IplImage.createCompatible(before);

32

33 IplImage src = cvLoadImage("example.jpg");

lottoscan.cpp (https://github.com/twelly/OpenCV.git) C++ · 143 lines

79

80 // Load template fle

81 IplImage* tmpl_0_to_9_img = cvLoadImage(tmpl_0_to_9_img_file, 0);

82

83 if(tmpl_0_to_9_img == NULL) {

87

88 // Load ticket image

89 IplImage* lotto_ticket_img = cvLoadImage(lotto_ticket_img_file, 0);

90

91 if(lotto_ticket_img == NULL) {

94 }

95

96 IplImage* tmp_ticket_img = cvCreateImage(cvGetSize(lotto_ticket_img), lotto_ticket_img->depth, 1);

97

98 // Pre-process images

ftype2.cpp (https://github.com/tnzk/shineshockd.git) C++ · 79 lines

37 int cpos_h = 50;

38

39 IplImage* img = cvLoadImage("image.bmp", CV_LOAD_IMAGE_COLOR);

40 IplImage* dst = cvCloneImage(img);

ImageProcessor.java (https://github.com/scotdalton/lcs-bak.git) Java · 96 lines

28

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 }

54

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};

11

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

14

15

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;

44

49 }

50

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

42 sscanf(argv[5], "%d", &size);

43

44 IplImage* image;

45 if (strcmp(featuretype,"OpponentSURF")==0 || strcmp(featuretype,"OpponentSIFT")==0) {

46 image = cvLoadImage(filename);

47 }

48 else {

49 image = cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE );

50 }

51

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) {

18

19 IplImage* imgReds[N_IMAGES];

20 IplImage* imgGreens[N_IMAGES];

21 IplImage* imgBlues[N_IMAGES];

22

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

85

86 // Cargo las imagenes

87 IplImage *src_a = 0;

88 IplImage *src_b = 0;

89 IplImage *dst = 0;

90 int width;

91 int height;

92

93 if( (src_a = cvLoadImage (filename_a, CV_LOAD_IMAGE_GRAYSCALE)) == 0 )

94 {

95 printf("Error al cargar: %s\n", filename_a);

98 }

99

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

42 sscanf(argv[5], "%d", &size);

43

44 IplImage* image = cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE );

45

46 vector<KeyPoint> keypoints;

OpticalFlow.cpp (https://github.com/yourtion/LearningOpenCV.git) C++ · 96 lines

19 int main(int argc, const char * argv[]) {

20

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;

26

27 IplImage* imgC = cvLoadImage( "data/OpticalFlow1.jpg", CV_LOAD_IMAGE_UNCHANGED );

28

29 IplImage* image_eig = cvCreateImage( img_sz, IPL_DEPTH_32F, 1 );

30 IplImage* image_tmp = cvCreateImage( img_sz, IPL_DEPTH_32F, 1 );

31

32 int corner_count = MAX_CORNERS;

50 CvSize pyr_sz = cvSize( imgA->width+8, imgB->height/3 );

51

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

7 {

8 assert(argc == 3);

9 IplImage* image = cvLoadImage(argv[1]);

10 CvMat* gray = cvCreateMat(image->height, image->width, CV_32FC1);

11 CvMat* x = cvCreateMat(image->height, image->width, CV_32FC1);

background.cpp (http://moya-kinect.googlecode.com/svn/trunk/) C++ · 162 lines

15

16

17 bool transBackground( IplImage *initImage, IplImage *endImage, IplImage *dstImage, int startTime, int endTime, int currentTime){

18 //int startTime = ;

19

43

44

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 }

140

141

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){

144

main.cpp (https://github.com/straiki/VisionCup-Deep-Team.git) C++ · 118 lines

29

30 for(;;){

31 IplImage *image = video->next_frame();

32

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

13

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 }

21

22 char MYdisplay::ShowImage(IplImage * image, char cvKey, const char * winName,int x, int y){

23 if( image != NULL){

24 cvShowImage(winName, image);

42 }

43

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"

58

59 %newobject cvLoadImage;

60 %newobject cvLoadImageM;

61 %newobject cvLoadImageMat;

62

63 %nodefault CvCapture;

68 %newobject cvCreateVideoWriter;

69

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

32 void main(int argc, char *argv[])

33 {

34 //IplImage *inputImage=NULL;

35 Image<uchar> *inputImage=NULL;

36 LFLineFitter lf;

51

52

53 //inputImage = cvLoadImage(imageName.c_str(),0);

54 inputImage = ImageIO::LoadPGM(imageName.c_str());

55 if(inputImage==NULL)

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;

155

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

16

17 // The output and temporary images

18 IplImage* originalThr = 0;

19 IplImage* original = 0;

20 IplImage* displayedImage = 0;

21

22 int param1,param2;

71

72 // open input image

73 original = cvLoadImage("pic6.png",0);

74

75 cvNamedWindow("input");

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

137

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

17 float range_0[]={0,256};

18 float* ranges[] = { range_0 };

19 IplImage *src_image = 0, *dst_image = 0, *hist_image = 0;

20 CvHistogram *hist;

21 uchar lut[256];

89 {

90 // Load the source image. HighGUI use.

91 src_image = cvLoadImage( argc == 2 ? argv[1] : file_name, 0 );

92

93 if( !src_image )

loadcvimage.cpp (https://github.com/yianni/cappocacciaactivevision.git) C++ · 136 lines

22 }

23

24 IplImage* tempimg = cvLoadImage( filename.c_str(), -1);

25 if(!tempimg) { std::cerr << "LoadCVImage::load()::ERROR::ERROR opening file [" << filename << "]\n"; return NULL; }

26

50

51 cvReleaseImage(&tempimg);

52 if(tempimg) { std::cerr << "LoadCVImage::load()::ERROR::Failed to release IplImage\n"; return NULL; }

53

54 //if(debug) { std::cout << "LoadCVImage::load()::finished\n"; }

56 }

57

58 CVImage* LoadCVImage::load(IplImage* InputImage) {

59 if(m_checkfileexistence) {

60

tp2diff.c (https://gitlab.com/mcaravario/orga2-tps) C · 202 lines

89

90 // Cargo las imagenes

91 IplImage *src_a = 0;

92 IplImage *src_b = 0;

93 IplImage *dst = 0;

94 int width;

95 int height;

96

97 if( (src_a = cvLoadImage (filename_a, CV_LOAD_IMAGE_UNCHANGED)) == 0 )

98 {

99 printf("Error al cargar: %s\n", filename_a);

102 }

103

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

33 EnableMemoryLeakCheck();

34

35 IplImage *src = 0, *dst = 0;

36 CvHistogram *hist = 0;

37

49 return -1;

50

51 if ((src=cvLoadImage(dlg.lpstrFile, 0)) == NULL) // force to gray image

52 return -1;

53

distrans.c (https://github.com/siegleal/iSanta.git) C · 189 lines

17

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;

24

25 IplImage* gray = 0;

26 IplImage* edge = 0;

27 IplImage* labels = 0;

102 char* filename = argc == 2 ? argv[1] : (char*)"stuff.jpg";

103

104 if( (gray = cvLoadImage( filename, 0 )) == 0 )

105 return -1;

106

ffilldemo.c (https://github.com/siegleal/iSanta.git) C · 187 lines

12 #endif

13

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";

73

74 if( (color_img0 = cvLoadImage(filename,1)) == 0 )

75 return 0;

76

TestDetection.cpp (https://github.com/sun11/Face-Recognition.git) C++ · 80 lines

59

60 // load image

61 IplImage* image = cvLoadImage(fullImageName, CV_LOAD_IMAGE_COLOR);

62 if ( !image ) {

63 printf("Error loading image!%s",fullImageName);

warp.cpp (https://github.com/joshuaeckroth/SURV-I.git) C++ · 55 lines

8 CvPoint2D32f srcQuad[4], dstQuad[4];

9 CvMat* warp_matrix = cvCreateMat(3,3,CV_32FC1);

10 IplImage *src, *dst;

11 if( argc == 2 && ((src=cvLoadImage(argv[1],1)) != 0 )) {

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);

23

24 bool _stdcall HistogramProcess(LPWSTR csInputPath, LPWSTR csOutputPath)

30

31 //load image

32 IplImage *img = cvLoadImage(inputPath, 1);

33

34 if(!img)

36 else

37 {

38 IplImage *hsv = convertImageRGBtoHSV(img);

39 IplImage *H = cvCreateImage(cvGetSize(hsv), 8, 1);

123 }//end splitColor

124

125 IplImage *convertImageRGBtoHSV(const IplImage *imageRGB)

126 {

127 float fR, fG, fB;

contours.cpp (https://gitlab.com/vyablokov/opencvtest) C++ · 40 lines

11 }

12

13 IplImage *img = cvLoadImage(argv[1]);

14 IplImage *bin_img = cvCreateImage(cvGetSize(img), 8, 1);

irtkFileOpenCVToImage.cc (https://gitlab.com/mariadeprez/irtk-public) C++ · 62 lines

26 int irtkFileOpenCVToImage::CheckHeader(const char *filename)

27 {

28 IplImage *pimage = NULL;

29 pimage= cvLoadImage(filename,0);

38 void irtkFileOpenCVToImage::SetInput(const char *filename){

39 _pimage = NULL;

40 _pimage= cvLoadImage(filename,0);

41

42 // Read header

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

19

20 /** Replace your face with a trollface */

21 void VideoTest::Trollize(IplImage* frame)

22 {

23 cvClearMemStorage( fStorage );

53

54 // Create a new image to resize the original trollface

55 IplImage *temp = cvCreateImage(cvSize(r->width, r->height), frame->depth, frame->nChannels);

56

57 // Swap the real image in the temp buffer with the new dimension

76 {

77 CvCapture* capture;

78 IplImage* frame;

79 IplImage* frame_mod;

104

105 // Load the trollface

106 fImage = cvLoadImage("data/trollface.png", CV_LOAD_IMAGE_UNCHANGED);

107

108 if(!fImage)

baby_food.cpp (https://github.com/Newky/4thYear.git) C++ · 121 lines

14

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;

29

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 ////

117

118 private IplImage _image;

119 }

120

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;

19

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);

94

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);

100

101 if(images[currentImage] == NULL) break;

133

134

135 eigenVectors = (IplImage**)cvAlloc(sizeof(IplImage*) * numEigenvalues);

136

137 for(int i = 0; i < numEigenvalues; i++)

169 //float * projectedTestFace = 0;

170

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

34 params.nOctaveLayers=SURF_NOCTAVELAYERS;

35 CvMemStorage* storage = cvCreateMemStorage(0);

36 IplImage* image = cvLoadImage(filename, CV_LOAD_IMAGE_GRAYSCALE );

37 CvSeq *objectKeypoints = 0, *objectDescriptors = 0;

38

morphology.c (https://gitlab.com/Ruggero/SparkEngine_Desktop) C · 130 lines

4 #include <stdio.h>

5

6 IplImage* src = 0;

7 IplImage* dst = 0;

80

81 filename = argc == 2 ? argv[1] : (char*)"baboon.jpg";

82 if( (src = cvLoadImage(filename,1)) == 0 )

83 {

84 printf("Cannot load file image %s\n", filename);

watershed.cpp (https://github.com/siegleal/iSanta.git) C++ · 147 lines

10 #endif

11

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};

16

42 CvRNG rng = cvRNG(-1);

43

44 if( (img0 = cvLoadImage(filename,1)) == 0 )

45 return 0;

46

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

51 /*

52 long xy[][][]= new long[16][10000][2];

53 IplImage src = cvLoadImage("C:/Users/chens_000/Desktop/new2/click.jpg",0);

54 // IplImage gray = cvCreateImage(cvGetSize(src), IPL_DEPTH_32F, 1);

extrinsic.cc (https://github.com/AsherBond/MondocosmOS.git) C++ · 78 lines

32 }

33

34 IplImage *imgPMD = cvLoadImage(argv[3], CV_LOAD_IMAGE_GRAYSCALE);

35 IplImage *imgPMDU = cvCreateImage(cvGetSize(imgPMD), 8, 1);

36 IplImage *imgCam = cvLoadImage(argv[4], CV_LOAD_IMAGE_GRAYSCALE);

37 IplImage *imgCamU = cvCreateImage(cvGetSize(imgCam), 8, 1);

facedetect.cpp (https://github.com/usmanghani/Misc.git) C++ · 39 lines

2 #include "facedetect.h"

3

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

39 cvInitFont(&font, CV_FONT_HERSHEY_PLAIN, 1.0, 1.0);

40

41 IplImage *img;

42

43 if ((img = cvLoadImage(imageFile, CV_LOAD_IMAGE_GRAYSCALE)) == 0)

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;

69

70 int nelems;

108 //nelems = fread(in_image, (size_t)1, (size_t)IMAGE_SIZE, in_file);

109

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]);

42

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);

43

44 // create reference to IplImage for use with CUDA classes:

46

47 // create empty Ipl output image:

48 IplImage* image_output = cvCreateImage( cvGetSize(image_input) , image_input->depth,

49 image_input->nChannels );

50

fisheye.cpp (https://github.com/aiwenar/Eyes.git) C++ · 132 lines

8

9

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

12

13 int main (int argc, char **argv){

14 IplImage *src_img, *dst_img, *tmp_img;

15

16 // 画像の読み込み(グレースケールで読み込み)

17 if (argc != 2 ||

18 (src_img = cvLoadImage (argv[1], CV_LOAD_IMAGE_GRAYSCALE)) == 0){

19 fprintf(stderr,"Usage: $ %s img_file\n",argv[0]);

20 return -1;

ch3_ex3_14.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 55 lines

32 int main(int argc, char** argv)

33 {

34 IplImage *src1, *src2;

35 if( argc == 9 && ((src1=cvLoadImage(argv[1],1)) != 0

36 )&&((src2=cvLoadImage(argv[2],1)) != 0 ))

37 {

38 int x = atoi(argv[3]);

combine.cc (https://github.com/aldonline/node-nativeimage.git) C++ · 52 lines

11

12 // load all images

13 IplImage* img0 = cvLoadImage( path1 );

14 IplImage* img1 = cvLoadImage( path2 );

15 IplImage* img2 = cvLoadImage( path3 );

16 IplImage* img3 = cvLoadImage( path4 );

22

23 // create destination image, half the size of the full-size montage

24 IplImage* img = cvCreateImage( cvSize(w/2, h/2), 8, 3 );

25

26 // copy+resize each image onto destination

pyramid_segmentation.c (https://github.com/siegleal/iSanta.git) C · 102 lines

11 #endif

12

13 IplImage* image[2] = { 0, 0 }, *image0 = 0, *image1 = 0;

14 CvSize size;

15

58 char* filename = argc == 2 ? argv[1] : (char*)"fruits.jpg";

59

60 if( (image[0] = cvLoadImage( filename, 1)) == 0 )

61 return -1;

62

edge.c (https://gitlab.com/juan-cardelino/misc_projects) C · 70 lines

14 int edge_thresh = 1;

15

16 IplImage *image = 0, *cedge = 0, *gray = 0, *edge = 0;

17

18 // define a trackbar callback

36 char* filename = argc == 2 ? argv[1] : (char*)"fruits.jpg";

37

38 if( (image = cvLoadImage( filename, 1)) == 0 )

39 return -1;

40

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

26 int tbbNumThreads = -1;

27

28 void detect_and_draw_objects( IplImage* image, CvLatentSvmDetector* detector, int numThreads = -1)

29 {

30 CvMemStorage* storage = cvCreateMemStorage(0);

78 }

79 }

80 IplImage* image = cvLoadImage(image_filename);

81 if (!image)

82 {

fitellipse.c (https://github.com/siegleal/iSanta.git) C · 152 lines

27

28 // Load the source image. HighGUI use.

29 IplImage *image02 = 0, *image03 = 0, *image04 = 0;

30

31 void process_image(int h);

36

37 // load image and force it to be grayscale

38 if( (image03 = cvLoadImage(filename, 0)) == 0 )

39 return -1;

40

generic_descriptor_match.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 98 lines

15 }

16

17 IplImage* DrawCorrespondences(IplImage* img1, const vector<KeyPoint>& features1, IplImage* img2,

18 const vector<KeyPoint>& features2, const vector<DMatch>& desc_idx);

19

39

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");

62

63 IplImage* img_corr = DrawCorrespondences(img1, keypoints1, img2, keypoints2, matches2to1);

64

65 cvNamedWindow("correspondences", 1);

72 }

73

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

9 #endif

10

11 IplImage* image[2] = { 0, 0 }, *image0 = 0, *image1 = 0;

12 CvSize size;

13

56 char* filename = argc == 2 ? argv[1] : (char*)"fruits.jpg";

57

58 if( (image[0] = cvLoadImage( filename, 1)) == 0 )

59 return -1;

60

simpletest.cpp (https://github.com/jcbolor/libdecodeqr.git) C++ · 70 lines

22 // load image

23 //

24 IplImage *src=cvLoadImage(argv[1],1);

25 cvShowImage("src",src);

26

FaceRecognition.java (https://gitlab.com/Ap00rvSaxena/FaceRecognition-in-E-Attendance) Java · 51 lines

2

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;

40

41 IplImage GrayVCFrame = IplImage.create(getVCFrame.width(), getVCFrame.height(), IPL_DEPTH_8U, 1);

42

43

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

27 #include <highgui.h>

28

29 void saturate_sv( IplImage* img ) {

30

31 for( int y=0; y<img->height; y++ ) {

42 int main( int argc, char** argv )

43 {

44 IplImage* img = cvLoadImage( argv[1] );

45 cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE );

46 saturate_sv(img);

test-surf-sim.cpp (https://github.com/sileht/debbot-seeks-experimental.git) C++ · 60 lines

38 std::string img2 = std::string(argv[2]);

39

40 IplImage *img1_obj = cvLoadImage(img1.c_str(),CV_LOAD_IMAGE_GRAYSCALE);

41 IplImage *img2_obj = cvLoadImage(img2.c_str(),CV_LOAD_IMAGE_GRAYSCALE);

ImageLoader.cpp (https://github.com/p1r4nh4/CellTrack.git) C++ · 63 lines

14 m_queue->Report(Job::thread_started);

15 bool keepRunning = true;

16 IplImage* img = NULL;

17 while(keepRunning)

18 {

36 {

37 imgInMem++;

38 img = cvLoadImage((j.m_filename).mb_str());

39 m_queue->Report(Job::thread_loaded, j.m_imgPos, img, j.m_filename);

40 }

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;

20

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 }

13

14 IplImage *img = cvLoadImage(argv[1]);

15 IplImage *img2 = cvLoadImage(argv[2]);

20 threshold = 0.03;

21

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);

27

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();

120

140

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;

183

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) {

136

137

155 filename.append(end);

156

157 IplImage* img = cvLoadImage( filename.c_str() );

158 return img;

159

colorFill.py (http://mvh-source.googlecode.com/svn/trunk/) Python · 130 lines

14

15

16 image = highgui.cvLoadImage("frame.jpg", 1);

17 work = cv.cvCloneImage( image ); #cv.cvCreateImage( cv.cvGetSize( image ), 8, 3 );

18

29 mask = cv.cvCreateImage( cv.cvGetSize( image ), 8, 1 );

30

31 #IplImage* cvCloneImage( const IplImage* image );

32

33 work = image;

sobel_test.cpp (https://gitlab.com/B3h3m0th/ccv) C++ · 30 lines

15 {

16 assert(argc == 3);

17 IplImage* image = cvLoadImage(argv[1]);

18 CvMat* gray = cvCreateMat(image->height, image->width, CV_8UC1);

19 CvMat* x = cvCreateMat(image->height, image->width, CV_32FC1);

main.cpp (https://github.com/itrufeng/learncv.git) C++ · 56 lines

9

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);

33

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 }

31

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

11 exit(1);

12

13 IplImage *SrcImage, *WorkImage,*ComImage;

14 cout << "hello";

15 // Load a gray scale picture.

16 SrcImage = cvLoadImage(argv[1], 0);

17 if (SrcImage == NULL)

18 exit(1);

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);

21

22 cv::Mat imageO = (*image).clone();

23 //IplImage *imgO = new IplImage(imageO);

24

25

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];

34

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

63

64 //load image

65 IplImage *img_grayscale = NULL;

66 img_grayscale = cvLoadImage(img_path, 0);

70 }

71

72 IplImage *img_color = cvLoadImage(img_path, 1);

73 int pts_num = 5;

74 int im_width = img_grayscale->width;

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);

23

24 int main(int argc, char *argv[]) {

26 int height, width, step, channels;

27 uchar *data;

28 IplImage* img = 0;

29

30 if (argc < 2) {

34

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

5 main (int argc, char **argv)

6 {

7 IplImage *src_img, *dst_img;

8 IplImage *tmp_img;

9

10 // (1)画像の読み込み

11 src_img = cvLoadImage (argv[1], CV_LOAD_IMAGE_GRAYSCALE);

12

13 tmp_img = cvCreateImage (cvGetSize (src_img), IPL_DEPTH_16S, 1);

dt_box.cpp (https://github.com/metalbubble/CAM.git) C++ · 258 lines

43 }

44 int size;

45 IplImage *images[SCALE_NUM];

46 };

47

168 draw(const vector<CvRect> &rects, const char *iname)

169 {

170 IplImage *img = cvLoadImage(iname, 1);

171 const CvScalar color = cvScalar(0,0,255,0);

172

216 }

217

218 IplImage *gray = cvLoadImage(argv[1], 0);

219 if (!gray)

220 {

main.cpp (http://hppg.googlecode.com/svn/trunk/) C++ · 213 lines

42 int main(int argc, char *argv[])

43 {

44 IplImage* img = 0;

45 int height,width,step,channels;

46 uchar *data;

78

79 // load an image

80 img=cvLoadImage(argv[1]);

81 if(!img){

82 printf("Could not load image file: %s\n",argv[1]);

myimage.cpp (https://github.com/rayban/UchiyaMarkers.git) C++ · 123 lines

62 void MyImage::Swap(MyImage &src)

63 {

64 IplImage *tmp = m_img;

65 m_img = src.m_img;

66 src.m_img = tmp;

92 {

93 Release();

94 m_img = cvLoadImage(name);

95 w = m_img->width;

96 h = m_img->height;

112 }

113

114 MyImage::operator const IplImage* () const

115 {

116 return m_img;

ch3_ex3_12.cpp (https://github.com/malcolmreynolds/OpenCV.git) C++ · 53 lines

30 {

31

32 IplImage* src;

33 cvNamedWindow("Example3_12_pre", CV_WINDOW_AUTOSIZE);

34 cvNamedWindow("Example3_12_post", CV_WINDOW_AUTOSIZE);

35 if( argc == 7 && ((src=cvLoadImage(argv[1],1)) != 0 ))

36 {

37 int x = atoi(argv[2]);

cvcropimageroi.cpp (http://opencvx.googlecode.com/svn/trunk/) C++ · 58 lines

14 int main( int argc, char** argv )

15 {

16 IplImage* img = NULL, *crop = NULL;

17 int x = 0, y = 0, width = 1, height = 1;

18 float angle = 0, shear_x = 0, shear_y = 0;

23 }

24

25 img = cvLoadImage( argv[1] );

26 if( argc >= 6 )

27 {

main.c (https://github.com/ginrou/motion-deblur.git) C · 73 lines

15 int main(int argc, char* argv[] ){

16

17 IplImage *original = cvLoadImage( argv[1], CV_LOAD_IMAGE_GRAYSCALE);

18 IplImage *buf = cvLoadImage( argv[2], CV_LOAD_IMAGE_GRAYSCALE);

19 IplImage *captured;

20

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

11 {

12 /* data structure for the image */

13 IplImage *img = 0;

14

15 /* check for supplied argument */

21 /* load the image,

22 use CV_LOAD_IMAGE_GRAYSCALE to load the image in grayscale */

23 img = cvLoadImage( argv[1], CV_LOAD_IMAGE_COLOR );

24

25 /* always check */

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

87 CalcuTrans(m_pKeys,m_nKeys);

88

89 IplImage* m_pImg = cvLoadImage(im_file,CV_LOAD_IMAGE_GRAYSCALE);

90 cvSmooth(m_pImg,m_pImg,CV_GAUSSIAN,5,5,1);

91

ComponentOutputFramesImages.h (https://github.com/roboshepherd/swistrackplus.git) C Header · 44 lines

11

12 public:

13 enum eFileType { // see cvLoadImage for supported file types

14 FileTypePNG = 0,

15 FileTypeBMP = 1,

31 }

32

33 void DrawParticles(Display *mDisplay, IplImage* mImage);

34

35 private:

circledetect.cpp (https://github.com/jlsync/detector.git) C++ · 59 lines

27 int main(int argc, char** argv)

28 {

29 IplImage* img;

30 if( argc >= 2 && (img=cvLoadImage(argv[1], 1))!= 0)

31 {

32 IplImage* gray = cvCreateImage( cvGetSize(img), 8, 1 );

33 CvMemStorage* storage = cvCreateMemStorage(0);

34 cvCvtColor( img, gray, CV_BGR2GRAY );

main.cpp (https://github.com/gulimujyujyu/xlzhuathku_depthcolor.git) C++ · 41 lines

14 void img2float()

15 {

16 IplImage *pImg;

17 FILE *pFile;

18 int xx,yy;

19 float tmp;

20

21 pImg = cvLoadImage(i2f_imgFilename, 1);

22 pFile = fopen(i2f_floatFilename, "w");

23 for( yy=0; yy<HEIGHT; yy++) {

Fl_OpenCV.cxx (https://gitlab.com/BGCX067/fads-svn-to-git) C++ · 347 lines

4

5

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 }

34

35 bool fl_SaveImage(char*filename,IplImage *image)

36 {

37 if(image->nChannels==3){

130 }

131

132 void Fl_OpenCV::SetImage(IplImage *nimage)

133 {

134 if(image)

cvHoughCircles.cpp (https://github.com/yourtion/LearningOpenCV.git) C++ · 32 lines

13 int main(int argc, const char * argv[]) {

14

15 IplImage* image = cvLoadImage(argv[1], CV_LOAD_IMAGE_GRAYSCALE);

16

17 CvMemStorage* storage = cvCreateMemStorage(0);

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

6 int main(int argc, const char** argv)

7 {

8 IplImage *img = cvLoadImage(argv[1]);

9

10 //Haar + memory

resample_test.cpp (https://gitlab.com/B3h3m0th/ccv) C++ · 28 lines

15 {

16 assert(argc == 3);

17 IplImage* image = cvLoadImage(argv[1]);

18 CvMat* x = cvCreateMat((int)(image->height / 1.414), (int)(image->width / 1.414), CV_8UC3);

19 unsigned int elapsed_time = get_current_time();

final.c (https://hg.codeplex.com/empty7) C · 138 lines

17

18 //Read the input image

19 IplImage* imagem = cvLoadImage(nomeImagem, 1);

20

21 //Displays the original image

TemplateMatching.java (https://gitlab.com/cvtung/javacv) Java · 80 lines

23 int height = Integer.parseInt(args[4]);

24

25 IplImage src = cvLoadImage(

26 args[0], 0);

27 IplImage tmp = cvLoadImage(

28 args[1], 0);

29

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

7

8 // Load ticket and lotto image files

9 IplImage* lotto_ticket_img = cvLoadImage(lotto_ticket_img_file, 0);

10

11 if (lotto_ticket_img == NULL) {

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);

139

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 // ----------------------------------------------------------------------------

61

62 static IplImage* icvDecodeJpg(const std::string& data, int iscolor)

63 {

64 int channels = iscolor? 3: 1;

303

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;

348

edge.c (https://github.com/siegleal/iSanta.git) C · 68 lines

12 int edge_thresh = 1;

13

14 IplImage *image = 0, *cedge = 0, *gray = 0, *edge = 0;

15

16 // define a trackbar callback

34 char* filename = argc == 2 ? argv[1] : (char*)"fruits.jpg";

35

36 if( (image = cvLoadImage( filename, 1)) == 0 )

37 return -1;

38

hello.cpp (https://github.com/xushiwei/winx.git) C++ · 94 lines

27 int main()

28 {

29 IplImage *src = 0, *dst = 0;

30 CvHistogram *hist = 0;

31

43 return -1;

44

45 if ((src=cvLoadImage(dlg.lpstrFile, 0)) == NULL) // force to gray image

46 return -1;

47

ui-cvimage.c (https://gitlab.com/BGCX067/eyetracker-svn-to-git) C · 186 lines

31 }

32

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 );

35

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 );

44

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;

71

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;

45

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;

11

12 void detect_and_draw( IplImage* image );

13 const char* cascade_name ="haarcascade_frontalface_alt.xml"; //Ҫõķ

14

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 }

33

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;

138

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

9 #define RHO_GRANULARITY 1

10

11 IplImage *img_read;

12 IplImage *img_edges;

13 IplImage *img_sine;

14 int *img_sine_arr;

15 int threshold;

74 }

75

76 img_read = cvLoadImage(argv[1]);

77 if (NULL == img_read)

78 {

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++){

177

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());

194

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){

23

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;

40

41 // Load the RGB image from file

Histogrem-EMD.cpp (https://github.com/yourtion/LearningOpenCV.git) C++ · 134 lines

15 IplImage *src1, *src2;

16

17 if (argc == 3 && ((src1 = cvLoadImage(argv[1], 1)) != 0) && ((src2 = cvLoadImage(argv[2], 1)) != 0)) {

18

19 // HSV image and decompose into separate planes

20

21 IplImage* hsv1 = cvCreateImage( cvGetSize(src1), 8, 3 );

22 cvCvtColor( src1, hsv1, CV_BGR2HSV);

23

24

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 );

30

hist_test.cpp (https://github.com/emmjaykay/stanford_self_driving_car_code.git) C++ · 123 lines

46

47

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};

62

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;

153

154 IplImage* img = cvLoadImage(filename, desired_color);

155 if (!img)

156 return false;

main.cpp (https://github.com/maxn7/OpenCV.git) C++ · 77 lines

12 CvScalar scalaire ;

13

14 IplImage *img;

15

16 img=cvLoadImage("view.jpg",1); // 1 RGB, 0 niveau de gris

69 cvDestroyWindow("input");

70

71 //Libération de l'IplImage (on lui passe un IplImage**).

72 cvReleaseImage(&img);

73

morphology.c (https://github.com/BynreForest/FaceDetection.git) C · 110 lines

6 #include <stdio.h>

7

8 IplImage* src = 0;

9 IplImage* dst = 0;

59 {

60 char* filename = argc == 2 ? argv[1] : (char*)"baboon.jpg";

61 if( (src = cvLoadImage(filename,1)) == 0 )

62 return -1;

63

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;

23

24 import com.oim.common.system.ClientRobot;

25 import static org.bytedeco.javacpp.opencv_imgcodecs.cvLoadImage;

26 public class DesktopSaveTest extends JFrame {

27

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>

9

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);

facerecognition.c (https://github.com/raphaelcruzeiro/Face-Detector.git) C · 95 lines

9 CvMemStorage *storage;

10

11 PyObject *detectFaces(IplImage *img)

12 {

13 int i;

50 return NULL;

51

52 IplImage* frame;

53

54 char *file = "/usr/local/share/opencv/"

58 storage = cvCreateMemStorage(0);

59

60 IplImage* image = cvLoadImage(path, CV_LOAD_IMAGE_COLOR);

61

62 if(image == NULL) {

siftfeat.c (https://pdi2009.svn.codeplex.com/svn) C · 90 lines

43 int main( int argc, char** argv )

44 {

45 IplImage* img;

46 struct feature* features;

47 int n = 0;

63

64 fprintf( stderr, "Finding SIFT features...\n" );

65 img = cvLoadImage( img_file_name, 1 );

66 if( ! img )

67 {

03-resize.c (https://github.com/sergiokas/utn.git) C · 36 lines

5 {

6 // Puntero a la imagen cargada

7 IplImage* img;

8 IplImage* out;

12

13 // Carga la imagen

14 img = cvLoadImage("tucan.jpg",1);

15

16 // Crea una imagen vacia del mismo tamanio que la entrada

inpaint.cpp (https://github.com/BynreForest/FaceDetection.git) C++ · 84 lines

8 #include <stdlib.h>

9

10 IplImage* inpaint_mask = 0;

11 IplImage* img0 = 0, *img = 0, *inpainted = 0;

38 char* filename = argc >= 2 ? argv[1] : (char*)"fruits.jpg";

39

40 if( (img0 = cvLoadImage(filename,-1)) == 0 )

41 return 0;

42