Skip to content

Instantly share code, notes, and snippets.

@ollewelin
Created September 14, 2016 18:08
Show Gist options
  • Select an option

  • Save ollewelin/be26aafde008ac341f49e167e6e64380 to your computer and use it in GitHub Desktop.

Select an option

Save ollewelin/be26aafde008ac341f49e167e6e64380 to your computer and use it in GitHub Desktop.
//Generate info.txt
//File: test_prog.cpp
#include <stdio.h>
//Olle Welin [email protected]
main() {
FILE *fp;
printf("Generate a info.txt file to positive image how work with raspberry pi for opencv_traincascade \n");
fp = fopen("info.txt", "w+");
for(int i=0;i < 2000; i++)
{
fprintf(fp, "pos%d",i);
fprintf(fp, ".JPG 1 0 0 128 96\n");
// fprintf(fp, ".JPG 1 0 0 128 96\n");// default 128x96
}
fclose(fp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment