Log in or register to post comments

UserDefinedTarget demo and trying to have the captured image to JPG

March 12, 2013 - 5:05pm #1

Hi,

I will like to save to my http server the image captured which serve as a target image on the UserDefinedTarget Demo.

I think that the routine which create the image is named void ImageTargetsBuilder_UpdateCallback::QCAR_onUpdate(QCAR::State& state) in the file named EAGLView.mm the command which create the target image is i think dataSetUserDef->createTrackable(refFreeFrame.getNewTrackableSource());

What I do  ot know is how to get the image to an JPG format.

The upload to the http server part is ok for me.

thanks

Regisma

UserDefinedTarget demo and trying to have the captured image to JPG

April 28, 2017 - 11:47pm #8

hi,

i'm building shooting game  ..how can i get the image that is clicked as user defined target..i mean Getting the image used for a UserDefinedTarget ....i'm making AR game with vuforia package.

please can one help ..or give some suggestions.

UserDefinedTarget demo and trying to have the captured image to

March 14, 2013 - 7:19am #7

No, the Java trick will not work on iPhone, it is for Android;

can you post the question about how to convert the QCAR Image to a jpeg on iOS in the iOS section of the FOrum ?

https://developer.vuforia.com/forum/ar-technical-discussion/ios

Thanks.

UserDefinedTarget demo and trying to have the captured image to

March 14, 2013 - 7:08am #6

Hi,

I did check the image types obtaines and I see the following :

First one : GRAYSCALE

Second one : YUV

Thirs one: GRAYSCALE

Last one : GRAYSCALE

I believe that the image that I need is the second one, the YUV one.

I develop on Xcode for Iphone, doest the Java trick will word ?

Because the image type is YUV, does the trick still the same or I need to use another one ?

thanks

Regis

UserDefinedTarget demo and trying to have the captured image to

March 13, 2013 - 11:29pm #5

Hi,

in the tutorial I was pointing to:

https://developer.vuforia.com/forum/faq/android-how-can-i-access-camera-image

you can find some JNI code by which you can pass the image up to Java, and then in Java you can create a Bitmap;

once you have the Bitmap that contains your image, you can save it to JPEG, as described here for instance:

http://stackoverflow.com/questions/8800349/save-bitmap-as-a-jpeg-file

 

UserDefinedTarget demo and trying to have the captured image to

March 13, 2013 - 3:45pm #4

ok I did worked !

But now that I have a pointer to the image as QCAR::Image

How can I extract it as an JPG ?

thanks

Regis

 

 

UserDefinedTarget demo and trying to have the captured image to

March 13, 2013 - 9:50am #3

Hi,

I'm allmost there but I have few error when I add the following code:

 

#include <QCAR/Frame.h>

#include <QCAR/Image.h>

#include <QCAR/State.h>

 

 

void

RefFreeFrame::render()

{

    QCAR::Image *imageRGB565 = NULL;

    QCAR::Frame *frame = QCAR::getFrame();   <-----   the error is here /samples/UserDefinedTargets-2-0-7/Classes/UserDefinedTargets/RefFreeFrame.mm:195:32: No member named 'getFrame' in namespace 'QCAR'

 

    

    const QCAR::Image *image = frame->getImage(0);

 

...

 

thanks

 

Regis

 

UserDefinedTarget demo and trying to have the captured image to

March 12, 2013 - 11:25pm #2

Hi, you can caputre the current camera image (at the time that you build the UDT) using the QCAR::State::getFrame() to get the current Frame, and then QCAR::Frame::getImage ( index )  to get one image from the Frame.

You can also have a look at this tutorial; it's for Android (not iOS), but you can reuse the core part of it (C++):

https://developer.vuforia.com/forum/faq/android-how-can-i-access-th-camera-image

 

Log in or register to post comments