I am trying to generate an AR scene using Image Tracking based on the tutorial in AR.js documentation. When I was using the sample URL as provided in the demo in Codepen, it worked but when I specified the URL to be the path to my own generated image descriptors in my local machine, I got this error:
"Error in loading marker on Worker 404"
Since it was working well when I used the image descriptors provided in the demo, I assume it's something to do with the image descriptors that I generated, I am actually using the same image provided in the demo too so I don't think the problem is with the quality of the marker.
Here is my code aframe-ar.html:
<a-scene
vr-mode-ui="enabled: false;"
renderer="logarithmicDepthBuffer: true;"
embedded
arjs="trackingMethod: best; sourceType: webcam;debugUIEnabled: false;"
>
<a-nft
type="nft"
url="../image_descriptors/test"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5"
>
<a-entity
gltf-model='https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf'
scale="5 5 5"
position="100 100 0"
>
</a-entity>
</a-nft>
<!-- static camera that moves according to the device movemenents -->
<a-entity camera></a-entity>
</a-scene>
Here is my folder structure:
src
| -- image_descriptors
| -- test.fset
| -- test.fset3
| -- test.iset
| -- assets
| -- aframe-ar.html
I test it using XAMPP. I don't know why but if you see the console, there is log
base path: http://localhost:8080
So i tried
<a-nft
type="nft"
url="test/image_descriptors/test"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5">
with this folder structure:
htdocs (basically http://localhost:8080)
| -- test
| -- image_descriptors
| -- test.fset
| -- test.fset3
| -- test.iset
| -- assets
| -- aframe-ar.html
and it works
Related
I configured HighCharts on our Zeppelin Tool to implement a drill down functionality.
We placed the below jar files and stated the same in the Dependencies
Zeppelin-highcharts-0.6.4.jar
lift-json_2.11-2.6.3.jar
paranamer-2.4.1.jar
We tried executing the below code-
val bank = spark.read.option("header",true).csv("/u01/zepplin/bank/bank2.csv")
bank.show()
+---+-------+
|age|balance|
+---+-------+
| 20| 40000|
| 30| 60000|
| 50| 70000|
| 80| 90000|
+---+-------+
import com.knockdata.spark.highcharts._
import com.knockdata.spark.highcharts.model._
highcharts(bank.series("x" -> "age", "y" -> sum(col("balance"))).orderBy(col("age"))).plot()
But this code is not able to plot anything, giving a blank out put.It just shows the tile(Chart Title).
To rule out the browser compatibility issue I tried this on all the browsers too.
Am I missing something here.Do we have any alternative for High-charts for custom visualization like drill down etc.
Thanks in Advance
I am running into a very unique edge case with my TinyMCE user experience.
I want to be able to
COPY IMAGE (Right click, copy image on any image on the internet)
PASTE IMAGE (CTRL + V) into TinyMCE editor
and have it save a local copy of this image and serve that.
The problem is a user can paste an image being served in S3 bucket and it is only authenticated for a certain amount of time, then days later the image will not show.
I have looked at TinyMCE - File Image Upload documentation to no avail.
Also looked into TinyMCE Paste Plugin, TinyMCE Local Upload Demo, TinyMCE Docs - Upload Images and dated gem TinyMCE-Rails-ImageUpload
Ultimately, I have a feeling that a custom handler for Paste Preprocess will need to be used
My tinymce.yml configuration follows:
menubar: false
statusbar: false
branding: false
toolbar:
- styleselect | bold italic underline strikethrough | indent outdent | blockquote | image | link | codesample | bullist numlist | table | code | undo redo
plugins:
- link
- codesample
- image
- lists
- code
- table
images_upload_url: "/tinymce_assets"
automatic_uploads: true
relative_urls: false
remove_script_host: false
convert_urls: true
table_responsive_width: true
I feel like this type of problem should be common and there should be a simple solution that I am not seeing. However, if not at all possible, would the solution be to create a custom js function that intercepts paste call, check if it is coming from external url, then decide to create a local image copy and give that url?
Thank you, and any help would be appreciated.
I'm trying to make a spoiler notice template in Fandom, with an expandable text section below it. I've hit a wall trying to get the variables and #ifeq statement to work.
The way this is supposed to work, the first parameter is the story type and controls the #ifeq statement. If the user puts "short story" into parameter 1, it wraps the title (parameter 2) in double quotes (""). Any other input (it defaults to "novel") italicizes it. The third param is a text section, what you're flagging as a spoiler, that defaults to hidden using built-in MediaWiki classes (from here).
{| style="width:100%; margin-top:1em; border:1px solid #999; font-size:90%; text-align:center;"
|-
! style="padding:0.2em 0.5em; background-color:red;" nowrap="nowrap" class="color1" | ''SPOILER WARNING<nowiki>!!!</nowiki>''
|-
| This section contains spoilers for the {{{1|novel}}} {{#ifeq: {{{1|}}}|short story|{{{1}}} "[[{{{2|{{PAGENAME}}}}}]]"|{{{1}}}{{{''[[{{{2|{{PAGENAME}}}}}]]''}}. Expand at your own risk.
|-
|}<div class="mw-collapsible mw-collapsed">
{{{3}}}
</div>
Source: https://aeon14.fandom.com/wiki/Template:Spoiler
Okay, I found the problem. It turned out I had some extraneous brackets in there, plus I had mistakenly left a second copy of parameter 1 in both fields. This is the fixed code:
{| style="width:100%; margin-top:1em; border:1px solid #999; font-size:90%; text-align:center;"
|-
! style="padding:0.2em 0.5em; background-color:red;" nowrap="nowrap" class="color1" | ''SPOILER WARNING<nowiki>!!!</nowiki>''
|-
| This section contains spoilers for the {{{1|novel}}} {{#ifeq: {{{1|}}}|short story|"[[{{{2|{{PAGENAME}}}}}]]"|''[[{{{2|{{PAGENAME}}}}}]]''}}. Expand at your own risk.
|-
|}<div class="mw-collapsible mw-collapsed">
{{{3}}}
</div>
We are using ImageMagick (Version: ImageMagick 6.9.1-7 Q16 x86_64) and its PHP extension Imagick on our LAMP stack to convert SVGs to JPEGs and it is taking an abnormally long amount of time when the SVG contains any text (12-13 seconds / file).
When the same thing is run as a standalone PHP script from the command line (or directly using IM’s convert) it converts quickly in under 1 second regardless whether it has text or not.
Worth of mention also is that we do not have this problem with GraphicsMagick.
(But it has some SVG bugs that are unresolved and prevent us from using it.)
Would anyone have an idea as to why the fonts take so long to process on the LAMP stack, or how to identify the root cause of the slowdown?
Sample SVG:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="344" height="243" viewBox="0 0 737 521">
<g class="main">
<title>Main</title>
<image xmlns:xlink="http://www.w3.org/1999/xlink" id="svg_12" height="218.4417" width="291.2556" y="32.2537" x="-10.893" xlink:href="/tmp/767756670842438737_7032fbfb3c364e6da226254687eb1edb.jpg" style="pointer-events:inherit">29.75235 32.253654 209.964875 218.441697</image>
<g font-size="normal" font-family="Allerta" class="textarea" id="svg_13" style="pointer-events:inherit">
<rect opacity="0" fill-opacity="0" stroke-opacity="0" stroke-width="2" fill="#000" id="svg_10" height="32" width="150.4384" y="293.06824" x="550.14683" style="pointer-events:inherit"/>
<text text-anchor="start" xml:space="preserve" fill="#000" font-size="21" y="293" x="550" id="svg_68" style="pointer-events:inherit">
<tspan dy="14" x="550" xml:space="preserve" id="svg_69" style="pointer-events:inherit">
hello </tspan>
<tspan dy="21" x="550" xml:space="preserve" id="svg_70" style="pointer-events:inherit">gc </tspan>
</text>
</g>
</g>
</svg>
and the code to convert:
$im = new Imagick();
$svg = file_get_contents($svgFile);
$svg = str_replace(array("\n", "\r", "\t"), '', $svg);
$im->readImageBlob($svg);
$im->setImageFormat("jpeg");
$im->writeImage($jpgFile);
$im->clear();
That SVG converts just fine for me.
The way to investigate this is to run the PHP script through strace with a command like:
strace -f -F /usr/local/bin/php testScript.php
But with the appropriate path for PHP on your system.
There is a high chance there is some error condition that is making 'something' take far longer than it should do. The strace command above will allow you to see all of the system calls that are being made, and how long each of them take.
I suspect what you will see some system call take almost all of the total time for processing, before returning an error code. If you can't figure out what it's output means, please attach the output to your question, or pastebin, and I will attempt to interpret the runes.
Warning - strace is capable of capturing information that you might not want revealed (e.g. secret keys) so care should be made before posting its output anywhere.
I am working on an ipad project that requires changing the formatting of image names for the project in a run script build phase in xcode 5. I am running the following script:
for f in ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/*.png
do
fileName=${f:${#BUILT_PRODUCTS_DIR}+${#FULL_PRODUCT_NAME}+2:${#f}}
lc='echo $fileName | tr "[:upper:]" "[:lower:]"
lc=`echo $lc | tr - _`
lc=${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/${lc}
mv $f $lc
done
The script finds all images in the bundle and makes the names all lowercase and changes uses of '-' to '_'. This works perfectly for my situation, however it is also changing the name of the app icon and launch images resulting in them not being used by the app.
What I want is either a way to have the script skip the app icon and launch images, or a way to simply change the names of the images in xcode so that the resulting name from the script is the accurate name.
The biggest issue I have had with simply manually changing the names is that I cannot find how xcode is controlling the naming system because the names I have for the images are already in the proper format so xcode must be creating its own names for the icon and launch images.
Thanks
Assuming standard naming, and that you don't also have your own files that begin with "Icon" or "Default", you could do this. If you have your own images that match that pattern, you will need to add special cases below, or specifically target all the various icon and launch image files.
for f in ${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/*.png
do
BASENAME=$(basename $f)
if [[ ${BASENAME} == Icon* ]] || [[ ${BASENAME} == Default* ]] ;
then
echo "App icon or launch image, leaving file alone"
else
fileName=${f:${#BUILT_PRODUCTS_DIR}+${#FULL_PRODUCT_NAME}+2:${#f}}
lc=`echo $fileName | tr "[:upper:]" "[:lower:]"`
lc=`echo $lc | tr - _`
lc=${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/${lc}
mv "$f" "$lc"
fi
done