본문 바로가기

Tech Note9

Android openCV #5 - BoxFilter 적용하기 (Filter 기본설명포함) Android openCV #5 - BoxFilter 적용하기 (Filter 기본설명포함) 아래내용은 제가 Gitbook으로 작성한 내용 입니다.gitbook을 통해 바로 보실 수 도 있습니다! 그리고 포스팅 내용에 관한 문의는 언제든 환영입니다!! https://jaehwanpark.gitbooks.io/opencv-android-study/content/boxfilter.html Box Filter첫 번째로 다뤄볼 Filter는 openCV 의 BoxFilter 입니다.void cv::boxFilter(InputArray src, OutputArray dst, int ddepth, Size ksize, Point anchor = Point(-1,-1), bool normalize = true, int.. 2017. 4. 16.
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.