SANJAYRAMAS007 / andar

Automatically exported from code.google.com/p/andar
0 stars 0 forks source link

Hardcoded to 240x160? #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Tobias, 

Thanks for porting this code over. 

I'm testing AndOpenGLCam on my new Nexus One. 

It looks like the code is hardcoded to 240x160 in several places. Is this
because of performance? Or just how the original codebase was coded? I
tried to change it to use a much larger preview size, because Nexus One can
do 800x480. 

Also, is it supposed to use the autofocus in the camera? It does not seem to. 

Lastly, I did a test where I counted the number of frames where a marker is
detected vs. number of frames where it is not (by checking cur_marker_id in
the draw() routine).  It seems to detect a marker approximately every 10-20
frames. So I occasionally see the grey box show up for a few frames, but
most of the time I don't see it. 

I test by opening the PDF file on my computer screen, and fill the frame of
the camera with it. 

Should I be getting better results? 

Original issue reported on code.google.com by suzy...@gmail.com on 13 Apr 2010 at 8:02

GoogleCodeExporter commented 8 years ago
hi,
yeah it was hardcoded for performance reasons, but should as well work with 
other sizes.

> Also, is it supposed to use the autofocus in the camera? It does not seem to. 
So far there are no calls issued to the autofocus callback.

So the grey box appears and disappears while you are not moving the cell phone?
That should not happen.

Did you try printing the marker out?

Original comment by tdomhan on 14 Apr 2010 at 8:12

GoogleCodeExporter commented 8 years ago
Thanks for the response. Generally, I can hold the marker in full view of the 
camera
and quickly see the cube before it disappears. Then it can be 5-10 seconds 
before I
see another quick flash of the cube. I tend to wiggle the camera around trying 
to get
it to see the marker. 

I think my problem is that I need to generate a camera_param.dat for the Nexus 
One.
I'll try to tackle that tomorrow. If you have an easy way to generate the
camera_param.dat, let me know. 

Also, let me know when you want someone to test your newer AndAR code, I'd like 
to
try it. Right now I can building and launch it, but haven't debugged why it 
hangs.

I was having a hard time figuring out where the hardcoding was happening for 
240x160,
i changed the area of the code where setPreviewSize() was happening, but it 
looked
like there might also be some hard coding in the native code. 

Again, thanks for your work on creating this project, I think it's great 
(especially
if I can get it working!!)

Original comment by suzy...@gmail.com on 14 Apr 2010 at 10:19

GoogleCodeExporter commented 8 years ago
Oh, and yes, i did print the marker out.

Original comment by suzy...@gmail.com on 14 Apr 2010 at 10:19

GoogleCodeExporter commented 8 years ago
there should only be one line where the 240x160 was hardcoded. 
in the native code there is definitly nothing hardcoded.
I just did this because things get really slow on the G1 if I don't do that.

I have never every touched the default camera calibration file. Everything 
worked 
fine with it so far.

If you use the patt.hiro pattern file then you have to print out the hiro 
pattern. 

I committed a file android.patt that can be used with the pattern you printed 
out.(already being used in the newest code)

I hope that will help!

Original comment by tdomhan on 16 Apr 2010 at 7:57

GoogleCodeExporter commented 8 years ago
I'm closing this bug as it seems to work now.

Original comment by tdomhan on 23 Apr 2010 at 3:17