Ask Your Question

Nemesis's profile - activity

2017-02-22 00:58:09 -0500 received badge  Popular Question (source)
2015-05-01 07:54:07 -0500 commented question NDK - include lib error

Thank you very much :) you are right. I have also asked here http://stackoverflow.com/questions/29... . It is already fixed. The problem was missing S in word INCLUDES

2015-04-29 11:14:13 -0500 received badge  Supporter (source)
2015-04-29 10:46:26 -0500 asked a question NDK - include lib error

I need your help because it drives me crazy. What cause my error?

The error is

jni/algorithm.cpp:4:33: fatal error: opencv2/core/core.hpp: No such file or directory  #include <opencv2/core/core.hpp>
                                 ^ compilation terminated. make: *** [obj/local/arm64-v8a/objs/algorithm/algorithm.o] Error 1

My algorithm.cpp is:

#include <jni.h>
#include <string.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"

using namespace std;
using namespace cv;

extern "C"
{
    JNIEXPORT jlong JNICALL Java_com_example_hematoma_MainActivity_fce(JNIEnv *env, jobject obj, jlong matimage)
          {
              Mat *jni_image  = (Mat*) matimage;

              return (jlong)jni_image;

          }
}

My Android.mk is:

LOCAL_PATH := $(call my-dir)

include /home/nemesis/adt-bundle-linux-x86_64-20140702/OpenCV-2.4.10-android-sdk/sdk/native/jni/OpenCV.mk

include $(CLEAR_VARS)
LOCAL_MODULE := algorithm
LOCAL_SRC_FILES := algorithm.cpp

LOCAL_C_INCLUDE := /home/nemesis/adt-bundle-linux-x86_64-20140702/OpenCV-2.4.10-android-sdk/sdk/native/jni/include/opencv2/core/core.hpp
LOCAL_C_INCLUDE += /home/nemesis/adt-bundle-linux-x86_64-20140702/OpenCV-2.4.10-android-sdk/sdk/native/jni/include/
include $(BUILD_SHARED_LIBRARY)

Of course I have also Application.so but I dont mention it here because I think it dont cause the error.

The error occurs when ndk try to build .so

2015-04-26 14:09:33 -0500 asked a question C++ rewrite to JNI

Hi, are there some rules how to rewrite c++ code to JNI. I have c++ opencv script and I need to use it in android application but I dont understand NDK :/. My script has only 180 lines. I have set up eclipse and I tried NDK samples but my problem is that i dont know how to rewrite c++ to jni. Can you give me some advise please?

2015-02-11 11:46:57 -0500 commented question OpenCV Automatic Thresholding values

Actualy I don't understand your question. :/ I have couple images of hematoma and for all of them I need different values for thresholding. I am trying to use some adaptive thresholding or a automatic one what can set values for thresholding by itself.

2015-02-11 10:37:35 -0500 received badge  Enthusiast
2015-02-10 12:34:43 -0500 received badge  Editor (source)
2015-02-10 12:24:43 -0500 asked a question OpenCV Automatic Thresholding values

Hi all, I am trying to write a function for automatic threshold value but I don't know how to get them from histogram. For example the histogram of the H channel(blue one) of the original image says that the first maximum belongs to the background, the second to the skin and the last to the hematome. For example I have this input image: http://i61.tinypic.com/dblke0.jpg

I convert input img to other color space (HSV) then I split channels and then I print out on histogram all channels H-blue line, S-green line, V-red line. http://i61.tinypic.com/15ckh2b.jpg . How would I write a function to get automatic binarization (thresholding values)?

2015-02-07 13:43:09 -0500 commented answer OpenCV RGB to HSV wrong colors, detection by color

thank you for yout answer. I was using just H value and I solve it by binarize both H and S images and with an AND operation I execute filtering. But I have done some tests and I found out that my simple binarization threshold( planes[0], img, 108, 255,THRESH_BINARY ); with set values are not so good with other images. Is there some smart threshold that can calculate it automatically from input image?

2015-02-05 11:41:32 -0500 asked a question OpenCV RGB to HSV wrong colors, detection by color

Hi, I am working on project what detect hematoma from skin. I am having issue with color after convertion from RGB to HSV. My algorithm detect hematoma by its color.

With some images I have good results like here:

Original img: http://imgur.com/WHiOWdj Result img: http://imgur.com/PujbnHa

But with some images i have bad result like this:

Original img: http://imgur.com/OshB99r Result img: http://imgur.com/CuNzAId

The same original image after convertion to HSV: http://imgur.com/lkVwtCs

Do you have any ideas how to fix it?

Thanks

2015-02-03 10:01:27 -0500 commented answer Best method to detect hematoma from white skin

Also do you know how can I get rid of small pixels? Let's say that my algorighm detect except hematoma also a piece of texture let's say tshirt same color. Is there some function what will ignore or delete smaller area?

2015-02-03 09:51:27 -0500 commented answer Best method to detect hematoma from white skin

works as a charm :) It gives me better result after your suggested way because after blur image lose "quality"

BTW: sorry for my english :D

2015-02-03 09:31:53 -0500 commented answer Best method to detect hematoma from white skin

I fixed it adding some blur medianBlur(smallHSV, smallHSV, 13); I will try also your suggestion, thank you

2015-02-03 08:34:23 -0500 commented answer Best method to detect hematoma from white skin

I am already doing morfology operation by opening(dilation(erosion(image))) and then I get contour by taking the Image - erode but I need to find out how to get rid of gaps

2015-02-03 06:49:04 -0500 commented answer Best method to detect hematoma from white skin

thank you for advice but can you be more specific? I am new in this area opencv. Also I want to ask if using new lib cvBlob would improve me results?

2015-02-02 13:55:17 -0500 commented answer Best method to detect hematoma from white skin

Haha actually it does look like a ghost indeed :D I don't know about hematoma temperature or how it looks like under IR light but thanks for the new idea. I will definitely check it out :)

2015-02-02 11:24:31 -0500 commented answer Best method to detect hematoma from white skin

Thank you for your quick answer. Good idea I will do that. But do you think there is some better method to detect in my case hematoma? I mean some other method as detecting by color.

2015-02-02 10:53:30 -0500 asked a question Best method to detect hematoma from white skin

Hi guys,

does anyone know what would be the best way to detect hematoma from white skin? I have image of skin with hematoma and I want to detect just hematoma.

I wrote algorithm to detect hematoma by hue color, as you can see it is not the best way because i have gaps there and some wrong detected pixels. image description

My question is what would be better method. Haar cascade? Active contours? Edge derector? or is there something what I can try?

Thank you for your help.