Comments (6)
Ah, so if the camera interface is via java methods, you'll need to manually feed the frames to the native side. The new videoExternal module supports this. I can help some more from mid-next week.
from artoolkitx.
Hi, if I understand correctly, this is an external camera supported by other Android camera apps? If so, it might be as simple as requesting the external camera in the configuration. I've listed the options here: https://github.com/artoolkitx/artoolkitx/wiki/artoolkitX-video-module-configuration-reference#ar_video_module_android. If the camera correctly registers itself as external, you might be able to connect to it by using video config string of -module=Android -native -position=external
. See https://github.com/artoolkitx/artoolkitx/wiki/artoolkitX-video-module-configuration-reference#changing-video-configuration for details on how to change the video configuration in your app.
from artoolkitx.
Hi, the device was not recognized as an external camera (((. It only have function
override fun onCaptureData(timestamp: Long, bytes: ByteArray)
where I can get a frame and send it to artoolkitx
from artoolkitx.
Hi, i'm back. May you describe a way to use external camera?
from artoolkitx.
from artoolkitx.
I don't see anything in the Moverio SDK docs on the format of the buffers returned, but I guess a reasonable guess would be that they're NV21 format.
Since you will need to pass the video frames to artoolkitX externally, you will need to make a couple of changes in ARController.java's start() method.
At https://github.com/artoolkitx/artoolkitx/blob/master/Source/ARXJ/ARXJProj/arxj/src/main/java/org/artoolkitx/arx/arxj/ARController.java#L141, change it to arwStartRunning("-module=External", cameraParaPath)
, and then add an extra line: ARX_jni.arwVideoPushInit(0, width, height, "NV21", 0, 0);
You'll need to use the CaptureDataCallback2 type:
mCaptureDataCallback = new CaptureDataCallback2() {
@Override
public void onCaptureData(long timestamp, byte[] data) {
ARX_jni.arwVideoPush(0,
data, data.limit(), 0, 0, // OK to provide 0 for strides when using NV21.
null, 0, 0, 0,
null, 0, 0, 0,
null, 0, 0, 0);
}
};
Also, you must call ARX_jni.arwVideoPushFinal()
before calling arwVideoStop
from artoolkitx.
Related Issues (20)
- Help clarify the purpose/history behind ARToolkitX vs ARToolkit5 HOT 1
- How can I do it on mac?
- Automatic build system HOT 5
- Will support Apple chip compilation in the future? HOT 1
- Expose video source input list to ARX interface HOT 1
- 【Android】there is some shifting when i use filament to render model
- Bugged camera in android 12 HOT 1
- Build script fails under Ubuntu 22.04 HOT 7
- How to make artoolkit not use camera, but realize nft detection through external incoming frame data HOT 2
- I tried opening the sample app "2d tracking example" on Android 13, same problem. HOT 2
- Question: what is configuration? HOT 1
- Raspberry Pi install HOT 1
- AR2DTrackingExample Android demo cube render problem
- about Creating a multi-marker set HOT 1
- Different input size,like set Android resolution 480*360, but got cvMat 640*480 HOT 3
- Can't install on fedora 38
- building on fedora 38 fails HOT 5
- how to cancel camera auto-focus
- Whether the SDK supports it and whether the image and feature file are the same
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from artoolkitx.