Normalize line endings and whitespace

This commit is contained in:
OpenCV Buildbot
2012-10-17 11:12:04 +04:00
committed by Andrey Kamaev
parent 0442bca235
commit 81f826db2b
1511 changed files with 258678 additions and 258624 deletions

View File

@@ -1,9 +1,9 @@
@ECHO OFF
SETLOCAL
PUSHD %~dp0
SET PROJECT_NAME=hello-android
SET BUILD_DIR=build_armeabi
SET ANDROID_ABI=armeabi
CALL ..\..\..\android\scripts\build.cmd %*
POPD
ENDLOCAL
@ECHO OFF
SETLOCAL
PUSHD %~dp0
SET PROJECT_NAME=hello-android
SET BUILD_DIR=build_armeabi
SET ANDROID_ABI=armeabi
CALL ..\..\..\android\scripts\build.cmd %*
POPD
ENDLOCAL

0
samples/android/hello-android/cmake_android.sh Normal file → Executable file
View File

View File

@@ -1,27 +1,27 @@
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
const char* message = "Hello Android!";
int main(int argc, char* argv[])
{
(void)argc; (void)argv;
// print message to console
printf("%s\n", message);
// put message to simple image
Size textsize = getTextSize(message, CV_FONT_HERSHEY_COMPLEX, 3, 5, 0);
Mat img(textsize.height + 20, textsize.width + 20, CV_32FC1, Scalar(230,230,230));
putText(img, message, Point(10, img.rows - 10), CV_FONT_HERSHEY_COMPLEX, 3, Scalar(0, 0, 0), 5);
// save\show resulting image
#if ANDROID
imwrite("/mnt/sdcard/HelloAndroid.png", img);
#else
imshow("test", img);
waitKey();
#endif
return 0;
}
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
const char* message = "Hello Android!";
int main(int argc, char* argv[])
{
(void)argc; (void)argv;
// print message to console
printf("%s\n", message);
// put message to simple image
Size textsize = getTextSize(message, CV_FONT_HERSHEY_COMPLEX, 3, 5, 0);
Mat img(textsize.height + 20, textsize.width + 20, CV_32FC1, Scalar(230,230,230));
putText(img, message, Point(10, img.rows - 10), CV_FONT_HERSHEY_COMPLEX, 3, Scalar(0, 0, 0), 5);
// save\show resulting image
#if ANDROID
imwrite("/mnt/sdcard/HelloAndroid.png", img);
#else
imshow("test", img);
waitKey();
#endif
return 0;
}

View File

@@ -1,49 +1,49 @@
:: this batch file copies compiled executable to the device,
:: runs it and gets resulting image back to the host
::
:: Here is sample output of successful run:
::
:: 204 KB/s (2887388 bytes in 13.790s)
:: Hello Android!
:: 304 KB/s (8723 bytes in 0.028s)
@ECHO OFF
:: enable command extensions
VERIFY BADVALUE 2>NUL
SETLOCAL ENABLEEXTENSIONS || (ECHO Unable to enable command extensions. & EXIT \B)
PUSHD %~dp0
:: project specific settings
SET PROJECT_NAME=hello-android
:: try to load config file
SET CFG_PATH=..\..\..\android\scripts\wincfg.cmd
IF EXIST %CFG_PATH% CALL %CFG_PATH%
:: check if sdk path defined
IF NOT DEFINED ANDROID_SDK (ECHO. & ECHO You should set an environment variable ANDROID_SDK to the full path to your copy of Android SDK & GOTO end)
(PUSHD "%ANDROID_SDK%" 2>NUL && POPD) || (ECHO. & ECHO Directory "%ANDROID_SDK%" specified by ANDROID_SDK variable does not exist & GOTO end)
SET adb=%ANDROID_SDK%\platform-tools\adb.exe
:: copy file to device (usually takes 10 seconds or more)
%adb% push .\bin\%PROJECT_NAME% /data/bin/sample/%PROJECT_NAME% || GOTO end
:: set execute permission
%adb% shell chmod 777 /data/bin/sample/%PROJECT_NAME% || GOTO end
:: execute our application
%adb% shell /data/bin/sample/%PROJECT_NAME% || GOTO end
:: get image result from device
%adb% pull /mnt/sdcard/HelloAndroid.png || GOTO end
GOTO end
:: cleanup (comment out GOTO above to enable cleanup)
%adb% shell rm /data/bin/sample/%PROJECT_NAME%
%adb% shell rm /mnt/sdcard/HelloAndroid.png
:end
POPD
ENDLOCAL
:: this batch file copies compiled executable to the device,
:: runs it and gets resulting image back to the host
::
:: Here is sample output of successful run:
::
:: 204 KB/s (2887388 bytes in 13.790s)
:: Hello Android!
:: 304 KB/s (8723 bytes in 0.028s)
@ECHO OFF
:: enable command extensions
VERIFY BADVALUE 2>NUL
SETLOCAL ENABLEEXTENSIONS || (ECHO Unable to enable command extensions. & EXIT \B)
PUSHD %~dp0
:: project specific settings
SET PROJECT_NAME=hello-android
:: try to load config file
SET CFG_PATH=..\..\..\android\scripts\wincfg.cmd
IF EXIST %CFG_PATH% CALL %CFG_PATH%
:: check if sdk path defined
IF NOT DEFINED ANDROID_SDK (ECHO. & ECHO You should set an environment variable ANDROID_SDK to the full path to your copy of Android SDK & GOTO end)
(PUSHD "%ANDROID_SDK%" 2>NUL && POPD) || (ECHO. & ECHO Directory "%ANDROID_SDK%" specified by ANDROID_SDK variable does not exist & GOTO end)
SET adb=%ANDROID_SDK%\platform-tools\adb.exe
:: copy file to device (usually takes 10 seconds or more)
%adb% push .\bin\%PROJECT_NAME% /data/bin/sample/%PROJECT_NAME% || GOTO end
:: set execute permission
%adb% shell chmod 777 /data/bin/sample/%PROJECT_NAME% || GOTO end
:: execute our application
%adb% shell /data/bin/sample/%PROJECT_NAME% || GOTO end
:: get image result from device
%adb% pull /mnt/sdcard/HelloAndroid.png || GOTO end
GOTO end
:: cleanup (comment out GOTO above to enable cleanup)
%adb% shell rm /data/bin/sample/%PROJECT_NAME%
%adb% shell rm /mnt/sdcard/HelloAndroid.png
:end
POPD
ENDLOCAL

0
samples/android/hello-android/run.sh Normal file → Executable file
View File