我试图在C#代码中实现vuforia api.
我从服务器收到错误.
C#代码:
ASCIIEncoding Encoding = new ASCIIEncoding();
MD5 md5 = MD5.Create();
string requestPath = "/targets";
string serviceURI = "https://vws.vuforia.com"+ requestPath;
string httpVerb = "GET";
var contentMD5bytes = md5.ComputeHash(Encoding.GetBytes(""));
string contentMD5 = BitConverter.ToString(contentMD5bytes).Replace("-", "");
string contentType = "";
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
string date = string.Format("{0:r}", DateTime.Now.ToUniversalTime());
string StringToSign = String.Format("{0}\n{1}\n{2}\n{3}\n{4}", httpVerb, contentMD5, contentType, date, requestPath); // HTTP-Verb, Content-MD5, Content-Type, Date, Request-Path;
HMACSHA1 sha1 = new HMACSHA1(System.Text.Encoding.ASCII.GetBytes(secretKey));
byte[] sha1Bytes = Encoding.GetBytes(StringToSign);
MemoryStream stream = new MemoryStream(sha1Bytes);
byte[] …
Run Code Online (Sandbox Code Playgroud) 我正在使用Vuforia在图像目标上放置3D模型.我已经创建了一个适用于Android和iOS的通用C++解决方案.它适用于Android,但我无法让3D模型出现在iOS中.它完美地跟踪图像目标,但没有3D模型的迹象.我正在使用的3D模型可以在这里找到.
这就是我在做的事情:
每次需要渲染屏幕时,Vuforia都会调用此方法:
- (void)renderFrameQCAR
{
[self setFramebuffer];
[[ObjectController getInstance] getObjectInstance]->renderFrame();
[self presentFramebuffer];
}
Run Code Online (Sandbox Code Playgroud)
这是setFramebuffer
方法(Objective-C++):
- (void)setFramebuffer
{
if (context) {
[EAGLContext setCurrentContext:context];
if (!defaultFramebuffer) {
[self performSelectorOnMainThread:@selector(createFramebuffer) withObject:self waitUntilDone:YES];
}
#ifdef USE_OPENGL1
glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer);
#else
glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);
#endif
}
}
Run Code Online (Sandbox Code Playgroud)
这是renderFrame
方法(C++):
void IDRObject::renderFrame()
{
// Clear color and depth buffer
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// Get the state from QCAR and mark the beginning of a rendering section
QCAR::State state = QCAR::Renderer::getInstance().begin(); …
Run Code Online (Sandbox Code Playgroud) 我正在尝试为AR应用添加视频捕获功能.基本上记录屏幕上发生的事情,并将其保存为视频(允许用户共享).AR APP使用Vuforia-Unity SDK编写.我们在iOS平台上成功实现了这一点.
但是,在Android平台上做同样的事情我们遇到了很大的困难.(我们希望通过生根设备实现这一目标)
以下是我们的进展:
Vuforia程序使摄像机失灵,我无法访问视频流.
我尝试捕获每帧的screeshot,然后将它们组合成一些视频输出; 但帧率很差(小于1 fps).拍摄屏幕截图需要700毫秒.
我是从错误的方向思考的吗?任何帮助将深表感谢!非常感谢!艾萨克
以下是我的测试代码:
public void acquireScreenshot() {
DisplayMetrics metrics = new DisplayMetrics();
WindowManager WM = (WindowManager) MainActivity.this.getSystemService(Context.WINDOW_SERVICE);
Display display = WM.getDefaultDisplay();
display.getMetrics(metrics);
int height = metrics.heightPixels; // screen height
int width = metrics.widthPixels; // screen width
int pixelformat = display.getPixelFormat();
PixelFormat localPixelFormat1 = new PixelFormat();
PixelFormat.getPixelFormatInfo(pixelformat, localPixelFormat1);
int deepth = localPixelFormat1.bytesPerPixel;
byte[] arrayOfByte = new byte[height* width* deepth];
long tmp = System.currentTimeMillis();
try {
for(int i = 0 ; i < 10 …
Run Code Online (Sandbox Code Playgroud) 我需要将Zxing和vuforia集成在Unity中制作QR码扫描应用程序吗?我不知道如何将Zxing与Vuforia整合在一起.有人可以指导我如何做到这一点吗?我有Zxing .dll文件和Vuforia统一包.谢谢你.
我们在项目中使用了广泛的DRM播放器.在整合的同时,我们不得不将"死代码剥离"改为NO.它工作正常.
现在我们必须在项目中添加其他类和.a文件(Unity Vuforia文件).为此,我们不得不将"死代码剥离"恢复为YES.在调试模式下,一切正常,宽阔的DRM Player工作正常.但是在归档版本中,它立即崩溃了.如果"Dead Code Stripping"设置为No,那么我们会收到以下错误:
架构arm64的未定义符号:"Geo :: GetiOSAppDocumentsDir()",引自:libiPhone-lib.a中的Geo :: PathUtils :: GetSandboxDataPath()(GeoPathUtils.o)
对于广泛的玩家来说,我们需要"死代码剥离"到NO,对于统一文件,我们需要它为"是".我们如何解决这个问题?欢迎任何建议.
我正在关注Vuforia
并且我已经运行了样本,它工作正常,但如果我想启动我们自己的应用程序,那么你能帮助我如何启动应用程序.
谢谢.
在Android中,我试图通过使用本教程将JPCT集成到Vuforia:http://www.jpct.net/wiki/index.php/Integrating_JPCT-AE_with_Vuforia
应用程序第一次启动时,它可以正常工作,但是当我回去再次触摸"播放"时,它会崩溃.
这些是应用程序崩溃时我的LogCat中的错误:
FATAL EXCEPTION: main
java.lang.RuntimeException: [ 1362671862690 ] - ERROR: A texture with the name 'texture' has been declared twice!
at com.threed.jpct.Logger.log(Logger.java:189)
at com.threed.jpct.TextureManager.addTexture(TextureManager.java:138)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargetsRenderer.<init> (ImageTargetsRenderer.java:78)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.initApplicationAR(ImageTargets.java:807)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.updateApplicationStatus(ImageTargets.java:649)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.updateApplicationStatus(ImageTargets.java:641)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargets.access$3(ImageTargets.java:598)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargets$InitQCARTask.onPostExecute(ImageTargets.java:226)
at com.qualcomm.QCARSamples.ImageTargets.ImageTargets$InitQCARTask.onPostExecute(ImageTargets.java:1)
at android.os.AsyncTask.finish(AsyncTask.java:417)
at android.os.AsyncTask.access$300(AsyncTask.java:127)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3691)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
Run Code Online (Sandbox Code Playgroud)
这是Imagetargetsrenderer.java代码
public class ImageTargetsRenderer implements GLSurfaceView.Renderer
{
public boolean mIsActive = false;
/** …
Run Code Online (Sandbox Code Playgroud) 嗨,我正在尝试使用Vuforia SDK开发iOS应用程序,但在哪里可以找到开始集成此SDK的方法?我查看了Vuforia网站,但是没有关于如何在我的应用程序中集成SDK的有趣文档?有一个教程,我可以遵循,以了解它是如何工作的?在官方网站上只有Unity的教程,但我想在Objective-C中开发我的应用程序.我希望你能帮帮我
我正在关注一个需要自定义配置的教程(这里是链接),我认为这影响了我的 pod 文件,因为我收到了这个警告:
为了让 CocoaPods 集成工作,请将目标的基本配置设置
iBuilt
为Pods/Target Support Files/Pods-iBuilt/Pods-iBuilt.debug.xcconfig
或包含Pods/Target Support Files/Pods-iBuilt/Pods-iBuilt.debug.xcconfig
在您的构建配置中 (iBuilt/Unity.xcconfig
)。[!] CocoaPods 没有设置你的项目的基本配置,因为你的项目已经有一个自定义的配置集。为了让 CocoaPods 集成工作,请将目标的基本配置设置
iBuilt
为Pods/Target Support Files/Pods-iBuilt/Pods-iBuilt.release.xcconfig
或包含Pods/Target Support Files/Pods-iBuilt/Pods-iBuilt.release.xcconfig
在您的构建配置中 (iBuilt/Unity.xcconfig
)。
我参考了这些链接:StackOverflow和Github以获得潜在的解决方案,但这些建议都不起作用。所以我需要你的帮助:)
我刚刚开始了一个包含Vuforia SDK的新项目。进行了一些更改之后,我决定从Asset Store安装GitHub扩展进行一些备份。之后,我的textMeshPro插件发疯了,抛出了一个我无法处理的烦人的错误。错误提示:
Library\PackageCache\com.unity.textmeshpro@2.0.0\Scripts\Editor\TMP_PackageUtilities.cs(310,17): error CS0433: The type 'Task' exists in both 'System.Threading, Version=1.0.3333.0, Culture=neutral, PublicKeyToken=402899b480e6f383' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Run Code Online (Sandbox Code Playgroud)
有谁知道如何摆脱它?
我的Unity版本是2019.1.0f2