1

I am trying to create object detection algorithm in java from the sample code here . However in the code the image value is hardcoded.Is there way i can pass the image location on my own.

   const char * imgInFile = "/sdcard/nonfree/img1.jpg";// Need to pass custom values
const char * imgOutFile = "/sdcard/nonfree/img1_result.jpg";

Thank You

1
  • would be replaced with String or byte[] or char[] and note that each char in java takes 2 bytes :) Commented Mar 17, 2014 at 15:10

2 Answers 2

0

Sure, in Java use

private String imgInFile;
private String imgOutFile;

Then either read these values from an input file, or get them from arguments passed to you application when you run it.

Sign up to request clarification or add additional context in comments.

Comments

0

You can add a string parameter to runDemo method. You should change method signature in java and fix jni method prototype in nonfree_jni.cpp file and... Goolge how to pass string to jni.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.