8th wall Image Target Not tracking image - 8thwall-xr

I have downloaded 8th wall web starter project from github. I am trying to run flyer demo locally.
Flyer demo index.html, I have replaced app key with newly created web project with 8th wall console.
Next, code below is used to achieve image target functionality
<!-- Note: "name:" must be set to the name of the image target uploaded to the 8th Wall Console -->
<a-entity
xrextras-named-image-target="name: video-target"
xrextras-play-video="video: #jelly-video; thumb: #jelly-thumb; canstop: true"
geometry="primitive: plane; height: 1; width: 0.79;">
</a-entity>
<!-- Note: "name:" must be set to the name of the image target uploaded to the 8th Wall Console -->
<a-entity xrextras-named-image-target="name: model-target">
<!-- Add a child entity that can be rotated independently of the image target. -->
<a-entity xrextras-one-finger-rotate gltf-model="#jelly-glb"></a-entity>
</a-entity>
So in order to make above code work, I have uploaded two image from images folder inside flyer demo to 8th wall console with name mentioned in above code. When I am running this, image target is not detecting for both the images.
When I saw the documentation on the internet as well as here, I found that when you upload image target on 8th wall console, there is option to save and Enable however when uploading I can not see Enable option. Is this the reason image target is not working or do I need to publish 8th wall web app which include pricing to make this image target work?
Kindly help

Based on your code snippet, the xrextras-named-image-target component is looking for image targets named "video-target" and "model-target". Make sure these strings match the names of the image targets uploaded to the console.
Additionally, make sure the image targets are set to "Load Automatically". If not, edit the image target, check the "load automatically" and save the image target.

I have the same isue, and it returns an error in the editor wit the XR8.Controller line.
<a-scene
landing-page
xrextras-loading
xrextras-runtime-error
xrweb="disableWorldTracking: true"
XR8.XrController.configure({disableWorldTracking: true})
XR8.XrController.configure({imageTargets: ['advImg', 'anssImg', 'ar1Img', 'ar2Img', 'ar3Img', 'ds1Img', 'ds2Img', 'ds3Img', 'egImg', 'exjImg', 'jaImg', 'jr1Img', 'jr2Img', 'jr3Img', 'jvt1Img', 'jvt2Img', 'jvt3Img', 'lecImg', 'ow1Img', 'ow2Img', 'ow3Img', 'rb1Img', 'rb2Img', 'rb3Img', 'svImg']})
>
The line about disableWorldTracking doesn't return an error, but I can only see 5 image targets are active in the debugging mode, despite the world tracking has been disabled.

Related

Use Applescript to pull PDF attachments out of a note

I am adding several PDF documents to a note using the scan documents feature in Notes on my iPhone. I want to pull those attachments to a folder on my mac. I have the notes on iCloud so the note attachments are available. I can drag and drop, of course, but I want to automate the process. I tried to record my activity through automater and Scropt Editor, but they didn't pick up the drag and drops. I have moved to writing my own apple script.
I tried a number of approaches to the duplicate. I am able to get the path to the destination folder and can reference the items in the folder. The usage of the duplicate verb in Notes eludes me.
tell application "Finder"
set FWsimple to front window
set FW to (POSIX path of (target of front window as alias))
end tell
tell application "Notes"
set theAttachment to attachment id "x-coredata://EDDBBF66-DC2A-4A84-8913- 4548B5AA5D6C/ICAttachment/p2176"
set allAttachments to get every attachment of note "Patients 5/17/22"
duplicate the attachment to FW
end tell
{FWsimple, FW, theAttachment, allAttachments}
Running the above with the duplicate statement commented out gives me the following, so I know I am getting the objects. The front window target will be changed later, but it works for now to get the correct folder.
{Finder window id 2573 of application "Finder",
"/Users/sholland/Desktop/Applescript of Notes/",
attachment id "x-coredata://EDDBBF66-DC2A-4A84-8913-4548B5AA5D6C/ICAttachment/p2176" of application "Notes",
{attachment id "x-coredata:...p2034" of application "Notes"}
}
When I run I get: error "Notes got an error: Can’t make "/Users/sholland/Desktop/Applescript of Notes/" into type location specifier." number -1700 from "/Users/sholland/Desktop/Applescript of Notes/" to location specifier. I've tried using FWsimple and FW as the location specifier.
Please tell me how to use duplicate to copy the PDF to a folder.

Localize iOS App name in Unity

I'm'developing a Unity3D game that shows a different (localized) app name in the iPhone's home screen according to the user local language. Note that:
I already know how to localize the iOS app name by editing the Xcode project (create a InfoPlist.string file, localize it, add the CFBundleDisplayName key to it, etc.)
I also know how automatically localize an Android app name within the Unity editor (add a values-XX.xml file with the app_name property onto Assets/Plugins/Android/res/ folder, etc.)
The question is: how can I automatically localize my iOS app name within the Unity Editor so that I don't need to perform the error-prone task 1. every time I build the project?
I think that PostprocessBuildPlayer should be the way to go, however I haven't found any documentation on how to parse it and/or modify the Xcode project file correctly to achieve this.
Long time ago I ran into trouble when I tried to modify info.plist via the Build Player Pipeline especially when doing it in Append mode. It works only once and then subsequent builds fail with "The data couldn’t be read because it isn’t in the correct format." (s. Unity forum posts like this one and my blog posting about this problem) So I decided to take the alternative way combining a customised build with an Xcode Build Pre-action.
Three steps are required:
(1) Xcode setup:
In Xcode go to Edit Scheme / Build / Pre-actions. Then click the + sign to add a New Run Script Action.
In Provide build settings select Unity-iPhone.
Paste . ${PROJECT_DIR}/modify_info_plist.sh (note the dot and blank at the beginning, is ensures that the script is executed in the caller's shell)
So it should look like this:
(2) Script modify_info_plist.sh:
Within your script you have access to all environmet variables from Xcode (s. Xcode Build Setting Reference) and you can manipulate Info.plist using the defaults command (man page). Here is a sample I used to add gyroscope to the UIRequiredDeviceCapabilities:
# Code snippet used in Unity-iPhone scheme as "Build Pre-Action"
my_domain=${PROJECT_DIR}/Info.plist
status_bar_key=UIViewControllerBasedStatusBarAppearance
logger "Start adding keys to info.plist"
defaults write $my_domain $status_bar_key -boolean NO
if [ `defaults read $my_domain UIRequiredDeviceCapabilities | grep "gyroscope" | wc -l` = "0" ]; then
defaults write $my_domain UIRequiredDeviceCapabilities -array-add "gyroscope"
fi
logger "Keys added to info.plist successfully"
(3) Build Pipeline:
Put the following code in a static editor class to create a new menu item Tools / My iOS Build with shortcut cmd+alt+b:
static string IOSBuildDir= "Develop";
[MenuItem("Tools/My iOS Build %&b")]
public static void IOSBuild () {
string[] levels = { "Assets/Scenes/Boot.unity",
"Assets/Scenes/Level-1.unity",
// ...
"Assets/Scenes/Menu.unity"
};
string path = Directory.GetCurrentDirectory ();
path += "/" + IOSBuildDir + "/Info.plist";
if (File.Exists (path)) {
Debug.Log ("Removing file " + path);
File.Delete (path);
}
BuildPipeline.BuildPlayer (levels, "Develop", BuildTarget.iPhone,
BuildOptions.AcceptExternalModificationsToPlayer);
}
I know this is no perfect solution but it's the only one I found to work stable. Two drawbacks:
Step (1) has to be repeated after major Xcode format changes
New scenes have to be appended in the editor class code in step (3)

OpenCV 245 first building errors

I downloaded the sources of opencv-2.4.5 and I followed the tutorial (on the opencv site for windows) about the installing my own libraries everything. Ok. I created the opencv.sln file with cmake then I opened it with visual studio 2010 professional and I click the build solution but just 9 succeeded. Most of the 200 failed and most of the errors about tbbd.lib not found and opencv_core245d.lib not found with LNK1104 error. I'm trying to solve it for how many days. I've tried to show the ways of files... Anyone can help please? This is about my dissertation. (Build with No Common Language Support)
Collapse
I spent a good 15 hours or so to get the homework finished using OpenCV. 14.5 of those hours were spent just getting it setup properly. I ran through about 7 tutorial videos, several set up guides, and read hundreds of posts containing resolutions to the same erros I was getting.So I understand that simply installing OpenCV is not a trivial task and there are several steps to do this. So here is a straightforward tutorial for setting it up if you want to use openCV.
It is important to understand how things work as far as linking goes. There are three types of files, your headers that you include, the .dlls that contain the functions, and the libraries that contain instructions for how to call the functions in the .dlls. So here, rather than add just the .dlls as dependencies in the input linker, we are going to add the lib files. We will then create a System Environment variable that will tell the machine where to look for the .dll files when their corresponding library files are referenced. We will be creating a Property Sheet so that when we create a new project, we can simply add the settings to our project by clicking "Add Existing Property Sheet" instead of adding a new one. This way, we never have to go through this again.
FOLLOW THESE STEPS EXACTLY AND MAKE SURE VISUAL STUDIO IS CLOSED BEFORE CONTINUING
NOTE: When text is given in quotes with instructions to copy said text, do not include the quotes.
First of all, the easy part - download OpenCV 2.4.5 from their website. http://opencv.org/ and click OpenCV for Windows. It will download OpenCV 2.4.5.exe.
Install OpenCV
When the download finishes, double click OpenCV-2.4.5.exe to run it.
When asked where to extract the files, type ino the text box: "C:\"
C:\opencv should have been created upon completion. Navigate there to make sure.
Setup Environment Variables
WINDOWS 8 USERS:
- Right click the bottom left corner of your screen when the start icon pops up.
- Click "Command Prompt (Admin)"
- Type "SETX -m OPENCV_DIR C:\opencv\build" and press enter to set the opencv build directory as a System Environment Variable. Wait for the console to give you confirmation that it is set.
- Right click the bottom left corner of your screen when the "Start" icon pops up. Click System -> Advanced System Settings -> Environment Variables
- In the "System Variables" list box, under the "Variable" collumn, find "Path".
- Highlight the "Path" row and click edit.
- Click in the "Variable Value" text box and hit the "end" key on your keyboard to scroll to the end of the line and add a semicolon.
- Type the following: "C:\opencv\build\x86\vc10\bin;C:\opencv\build\x86\vc10" and click "OK". This will add the openCV bin directory to the system path.
WINDOWS 7 USERS:
Follow the same steps. The only difference is how you get to the command prompt and the system settings. Google how to set up an environment variable on Windows 7 if needed.
Setup Visial Studio
NOTE: I highly recommend VS2012 Professional because of advanced syntax highlighting that makes life so much easier when programming C++. This version can be downloaded and installed for free from DreamSpark. Just make and account with your student ID. However, the steps for VS2010 and VS2012 are the same.
Open Visual Studio
Click "New Project" and under "C++" select "Win32 Console Application".
When the window opens click "Next", check "Empty Project", and click "Finish". It is very important that you start with an EMPTY PROJECT without a precompiled header.
Locate the "Property Manager." By default, it should be a tab that is sometimes hard to miss. Alternatively it can be accessed by clicking from the toolbar "View" -> "Property Manager".
Right Click "Debug | Win32" and select "Add New Project Property Sheet". Name it "OpenCVProps" and click "Add".
Right Click your new property sheet and select "Properties".
From the left column, go to "C/C++" -> "General" and in the listbox on the right, select "Additional Include Directories" and click "Edit".
Add the following THREE directories:
"$(OPENCV_DIR)\include"
"$(OPENCV_DIR)\include\opencv"
"$(OPENCV_DIR)\include\opencv2"
From the left column, go to "Linker" -> "General" and in the listbox on the right, select "Additional Library Directories" and click "Edit".
Add the following directory:
"$(OPENCV_DIR)\x86\vc10\lib"
From the left column, go to "Linker" -> "Input" and in the listbox on the right, select "Additional Dependenies" and click "Edit".
Add the following .lib files to the depedencies. You may do this by copying and pasting these into that edit box. I have purposely not included a bulletpoint to make it easy for you to copy paste these.
opencv_core245d.lib
opencv_imgproc245d.lib
opencv_highgui245d.lib
opencv_ml245d.lib
opencv_video245d.lib
opencv_features2d245d.lib
opencv_calib3d245d.lib
opencv_objdetect245d.lib
opencv_contrib245d.lib
opencv_legacy245d.lib
opencv_flann245d.lib
NOTE: If building for release, these steps are the same. However, when copying and pasting these files, remove the 'd' from the end of each of them. The 'd' denotes that it is a release library and links to a release .dll.
Congrats! The difficult part is almost done! Click "OK" to close the Window.
Creating and Building a Test Project
Head over to our Solution Explorer. This can be focused from the toolbar via "View" -> "Solution Explorer"
Right click "Source Files" and select "Add" -> "New Item".
Select "C++ File (.cpp)" and name the file "main.cpp". Click "Add".
Copy and paste the following program and press "F7" on your keyboard and watch the bottom left corner of your screen to see if you get a "Build Succeeded" message. If so, only one step left before you compile and run! If not, please retrace your steps, or comment below and maybe I can help.
#include &ltopencv\cv.h&gt
#include &ltopencv\highgui.h&gt
int main(int argc, char* argv)
{ // openCV .image object
cv::Mat inputImage;
//Create a Window
cv::namedWindow("window",1);
// Initialize our image.
inputImage = cv::imread("Lenna.png");
// Always check to make sure that image has data.
if(inputImage.empty())
{
std::cout &lt&lt "Image Failed to Load.";
return -1;
}
else
{
// All is well, display me.
cv::imshow("window",inputImage);
// Wait for user to press a key to exit.
cvWaitKey(0);
}
return 0;
}
If the build succeeded, then all that is left is to add the image to your folder. The placement is very important. I have copied the directoy that I have placed mine in. Follow the same directory pattern.
"C:\Users\Josh\Documents\Visual Studio 2012\Projects\ConsoleApplication3\ConsoleApplication3\Lenna.png"
Now hit "Ctrl + F5" To build, compile, and run to observe your image in the window!!
*IF YOU HAVE A WEBCAM*
Copy and paste the following code to check if OpenCV is working without being required to add an image. This is useful because if the above code doesn't work, but this code does, then you know you put the image in the wrong folder.
#include
#include
int main(int argc, char* argv)
{ // openCV .image object
cv::Mat image;
//Create a Window
cv::namedWindow("window",1);
// Create the capture object.
cv::VideoCapture device;
// Open your webcam.
device.open(0);
while (1)
{
// Read data from your device and store it to the image frame.
device >> image;
// Always check to make sure that image has data.
if(image.empty())
{
std::cout&lt&lt "Image Failed to Load.";
return -1;
}
else
{
// All is well, display me.
cv::imshow("window",image);
// Wait for user to press a key to exit.
cvWaitKey(33);
}
}
return 0;
}
Happy Coding!! Let me know if something didn't work so I can fix it!
Quick Answer
I have managed to compile OpenCV with TBB support using the tutorial here.
Specs: Visual Studio 2012/ Win 7 (64 bit)/ OpenCV 2.4.5/ CUDA 5
I have downloaded the latest TBB zip and extracted it to C:/src/OpenCV/dep (as suggested in the tutorial linked above).
You have to use the following TBB settings in CMake (adapt depending on your file paths):
TBB_LIB_DIR :: C:/src/OpenCV/dep/tbb41_20130314oss/lib/intel64/vc11
TBB_INCLUDE_DIRS :: C:/src/OpenCV/dep/tbb41_20130314oss/include/
TBB_STDDEF_PATH :: C:/src/OpenCV/dep/tbb41_20130314oss/include/tbb/tbb_stddef.h
WITH_TBB :: checked
BUILD_TBB :: unchecked
More Information
Initially, I also wanted to install OpenCV with CUDA 5 support, but it seems that CUDA 5 is incompatible with VS2012. This is the error I got when compiling
OpenCV:
Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_matrix_operations.cu.obj
nvcc : fatal error : nvcc cannot find a supported cl version. Only MSVC 9.0 and MSVC 10.0 are supported
The good news is that you are using VS2010, which can be used with CUDA, as suggested here.
VS2012 can be set up to create projects with CUDA, but there is currently no way (AFAIK) to compile OpenCV with CUDA support for VS2012 (read this for more info).
In conclusion, people that need CUDA support should compile and use OpenCV with VS2010.
Also, when compiling OpenCV, I got the following errors:
error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm118' or greater
fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
I used the instructions here to finally compile OpenCV. I created a Property Sheet which had /Zm130 as an additional option in Common Properties > C/C++ > Command Line and added it
to all of the generated OpenCV projects.
For your reference, I also attach the CMake configuration and CMakeCache.txt file that I've used (CUDA is disabled as I am using VS2012):
CMake configuration: http://pastebin.com/8rJZGZ3T
CMakeCache.txt: http://pastebin.com/A0q8YgJg
Hope this helps and please comment if you need me to elaborate on any step.
I installed again opencv-master, opencv-2.4.5 and opencv-2.4.7 both to my new laptop. OpenCV-2.4.7's imread function returned always null but C-cvImageLoad worked well and opencv-master's cvLoadImage didn't work cvImageLoad or I missed something. But TBB's dir must be .../bin/ia32 not intel64 my OS is 64-bit but VS201x 32-bit this was my error. And I've get stitching and gpu errors and visual studio is telling about the error and this is usually memory allocation limit error and I did same things like your said #dilgenter and now it's working well but just 2.4.5 well and the python_d.lib error can be occur this is not a problem at debug mode I've read about this from a lot of forum sites. I'll try to find why 2.4.7's imread returning null Mat element. But now I'm too busy and this is

How to add launch image to a Sencha Touch 2 app?

The iOS guideline requires launch image for all apps. To my understanding, that's a "default.png" file located in the root folder of your app.
I packaged my app using Sencha CMD v3 and I don't see any launch image while loading.
There are some default launch images located in root/webapp/resources/loading/ folder but they are not showed in my app. Any idea?
The "startupImage" seems only appliable to the app added to the home screen, anyway, here is a part of my app.js:
startupImage: {
'320x460': 'resources/startup/320x460.jpg',
'640x920': 'resources/startup/640x920.png',
'768x1004': 'resources/startup/768x1004.png',
'748x1024': 'resources/startup/748x1024.png',
'1536x2008': 'resources/startup/1536x2008.png',
'1496x2048': 'resources/startup/1496x2048.png'
}
Added related posts:
[2.1] Splash screen is white on startup on Android and iOS
I have this at the beginning of my application - I'm not packaging it for iOS, but this seems like what you may need:
Ext.require([
'Ext.XTemplate',
'Ext.Panel',
'Ext.Button',
'Ext.List'
]);
// Main application entry point
Ext.application({
phoneStartupScreen: 'images/sencha_logo.png',
name: 'Analytics',
// setup our MVC items
Here is a handy-dandy link to the api doc on this:
http://docs.sencha.com/touch/2-0/#!/api/Ext.app.Application-cfg-phoneStartupScreen
For launch image you need to modify the index.html in your app directory. In here you will find a div with id appLoadingIndicator inside body tag. In my application I have replaced the content of #appLoadingIndicator with an img tag which refers to my splash image.
<div id="appLoadingIndicator">
<img src="resources/images/splash.png" />
</div>
For customizing the css you might want to remove the default embedded styles in index.html present in style tag inside the head tag which are applied to #appLoadingIndicator.
Now add your custom css and you will have your splash image ready.

nicEdit Uploading Locally - Issues with nicUpload

If anyone has managed to get locally uploading images I'd be mightily appreciative of some help.
I've downloaded the latest version of nicEdit along with the nicUpload plug in (from nicedit.com - Version 0.9 r24 released June 7th, 2012).
I've also downloaded nicUpload.php from http://svn.nicedit.com//trunk/nicUpload/php/nicUpload.php
NicUpload.php - I've set NICUPLOAD_PATH and NICUPLOAD_URI both to 'images' which is the subfolder of where nicupload.php and nicEdit.js are located.
NicEdit.js - I've added the following to line 271:-
uploadURI : 'nicUpload.php?id=123',
I've given it an ID otherwise it was failing with an invalid ID code. But the ?id=123 isn't meant to be there. I've also set the iconsPath accordingly.
Line 1370 I've switched this:-
nicURI : 'http://api.imgur.com/2/upload.json',
for this:-
nicURI : 'http://www.mydomain.com/nicedit/nicUpload.php',
But I'm still getting "Failed to upload image". I've searched and searched and searched for answers to this and I'm getting close to having spent two days tinkering with it.
With a few debugging displays I can see that it's failing on line 46 of nicUpload.php where it says:-
$file = $_FILES['nicImage'];
$image = $file['tmp_name'];
$max_upload_size = ini_max_upload_size();
if(!$file) {...
That last IF is true and that's where it exits with the error.
Appreciate anyone being able to help.
The nicUpload.php script file laying around sucks and I don't even understand how it could work.
NicEditor uses imgur as the default image upload service. The source code follows the API format described here: http://api.imgur.com/resources_anon#upload
My suggestion would be to implement the API request and response defined there.
I did not use the niceedit upload function to do what you want. I managed to add a button to the link and img dropdown menu. The button opens a file manager window where you also can upload. I managed to put then de url of the image or document into the nicedit drop down img or url window. That is how I solved the problem.

Resources