본문 바로가기

전체 글9

Android openCV #4 - 임계값 영상 구현하기 (Threshold Image) Android openCV #4 - 임계값 영상 구현하기 (Threshold Image) 아래는 원본 및 Threshold 적용 이미지 입니다.순서대로 원본, THRESH_BINARY 적용, THRESH_BINARY + THRESH_OTSU 적용 1)threshold 함수를 사용한 임계영상 구현int processToThreshold(Mat img_input, Mat &img_result){ cvtColor(img_input,img_result,CV_RGB2GRAY); Mat srcImage = img_result; Mat destImage1; double th1 = threshold(srcImage,destImage1,100,255,THRESH_BINARY); LOGD("threshold th1 = %.. 2017. 2. 28.
Android openCV #3 - 반전영상 구현하기(Negative Image) Android openCV - 반전영상 구현하기(Negative Image) 아래의 예제는 링크의 소스를 베이스로 해서 진행되고 있습니다.http://technote.tistory.com/3 실행결과 (원본, 반전영상) 1) 직접계산해서 반전영상 만드는 방법 1. 반전영상에 사용할 Image를 Bitmap 변수에 저장.if(mBitmap != null){ img_input = new Mat(); img_output = new Mat(); Utils.bitmapToMat(mBitmap,img_input); convertNativeLibtoNegative(img_input.getNativeObjAddr(),img_output.getNativeObjAddr()); Utils.matToBitmap(img_out.. 2017. 2. 28.
Android openCV #2 - android studio에서 JNI debugging log 출력 Android openCV #2 - android studio에서 JNI debugging log 출력 1. CMakeList.txt 파일에 아래 내용 추가#android log find_library( android-lib android)target_link_libraries( # Specifies the target library. native-lib # Links the target library to the log library # included in the NDK. ${log-lib} ${android-lib} lib_opencv )2. 몇가지 편리한 사용을 위해서 별도의 header 파일 생성 (example : log.h)#ifndef OPENCVTESTJNI_LOG_H #define OP.. 2017. 2. 28.
Android openCV #1 - Android Studio 에서 openCV 개발환경 세팅하기(링크) Android openCV #1 - Android Studio 에서 openCV 개발환경 세팅하기(링크) Android studio에서 openCV 개발 환경 세팅 하는 방법 입니다. (아래링크)매우 잘정리되어 있습니다. 나중에 좀더 좋은 방법이 있으면 별도로 작성하려고 합니다. http://webnautes.tistory.com/1055 2017. 2. 17.