Programowanie w systemie UNIX/OpenCV: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
m Dodano kategorię "Linux" za pomocą HotCat
Nie podano opisu zmian
Linia 90:
gcc opencv.c -o opencv `pkg-config --libs --cflags opencv` -ldl -lm
===wersja===
<sourcesyntaxhighlight lang=c>
/*
http://stackoverflow.com/questions/2422514/how-to-check-for-opencv-on-ubuntu-9-10/12449594#12449594
Linia 105:
printf("%u.%u.%u\r\n", CV_MAJOR_VERSION, CV_MINOR_VERSION, CV_SUBMINOR_VERSION);
}
</syntaxhighlight>
</source>
 
 
Linia 116:
 
===gui i otwieranie obrazów ===
<sourcesyntaxhighlight lang=c>
/*
http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/
Linia 192:
return 0;
}
</syntaxhighlight>
</source>
 
=== mysz===
<sourcesyntaxhighlight lang=c>
/*
http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/
Linia 316:
printf("OpenCV version = %s\r\n", CV_VERSION);
return 0;
}</sourcesyntaxhighlight>
 
==c++==
Linia 325:
===pierwszy program, wersja ===
 
<sourcesyntaxhighlight lang=cpp>
// https://www.solarianprogrammer.com/2014/04/21/opencv-beaglebone-black-ubuntu/
// Test to check the OpenCV version
Linia 338:
return 0;
}
</syntaxhighlight>
</source>
 
Przykłądowy wynik :
Linia 348:
 
 
<sourcesyntaxhighlight lang=cpp>
// http://docs.opencv.org/master/db/df5/tutorial_linux_gcc_cmake.html
// DisplayImage.cpp
Linia 373:
return 0;
}
</syntaxhighlight>
</source>
 
 
Linia 398:
===Gradient===
 
<sourcesyntaxhighlight lang=cpp>
// original code by http://stackoverflow.com/users/951860/mevatron
// see http://stackoverflow.com/a/11157426/15485
Linia 482:
return 0;
}
</syntaxhighlight>
</source>
 
 
CMakeLists.txt :
<sourcesyntaxhighlight lang=make>
cmake_minimum_required(VERSION 2.8)
project( g )
Linia 493:
add_executable( g g.cpp )
target_link_libraries( g ${OpenCV_LIBS} )
</syntaxhighlight>
</source>
 
Kompilacja :