Replace real world text using ARKit and Vision(?) - text

I'm trying to build a translator app which would be able to replace foreign text in the real-time, but after exploring possible approaches got a bit cornered.
Even though I was able to extract words images using Vision, I couldn't replace them in place in ARKit scene. Then I tried using ARReferenceImage and image tracking, but it needs to know the physical width of the target image which I can not guarantee, as the text could be on any surface from a book to a billboard.
Am I missing something? What would you guys suggest?

Related

Right/center align text using opentype.js

I am using OpenType.js to generate SVG from strings, by default the alignment is set to left, which works most of the time, but occasionally I have some texts that need to be center/right aligned.
I checked the web and there is very little on this subject, so I was wondering if anyone has ever looked into this in the past and can give me a hint on how I can get center/right alignment.
EDIT
I ended up using fabric js to achieve the above.

svg vs canvas - browser game map?

I am trying to make a copy of the popular browser game Travian.com. I am currently working on the maps and I was able to get the farms overview image as a png.
What I am trying to accomplish with that map is:
Each element (farm) should be clickable) and redirect to that specific farm page.
As you could see on the map, farms are not just simple squares.
Once I had the farms.png picture, I used on online tool to convert a png into a .svg file. Using a free software, I was able to draw circles around each map to build my svg.
This is the result:
I recently read about canvas and I was wondering if canvas would be a better option in my case rather using svg?
You need to try it yourself and see if it gets redrawn quickly enough that the game is sufficiently responsive for you. If the map is very detailed, the redraw may be too slow and make your game feel slow. You really need to try it and see. If it's too slow for you, then you may need to either:
use bitmap images, or
keep the maps as SVGs, but render them to a Canvas on first load. This way they'll be sharp at whatever resolution screen the user has.

Looking for a way to convert SVG/Points to text (not OCR)

I have recently been playing around with a web app that allows the user to draw paths on an SVG using touch or a stylus (the idea is to make a simple note taking web app).
Now I would like to add the ability to convert SVG Paths to text. So my question is: How do I convert the coordinates of the SVG Path to text?
I'm just at a loss of how you would call such a process (and hours of googling something with no idea what to call it has not yielded results). And when I search for something remotely linked to text recognition I can only find things about OCR.
I'm not looking for OCR, because that requires bitmap images. I'm looking for a way to convert SVG Paths or points/vectors to text.
Can anybody point me in the right direction of what this is called so I can read more about the topic and dont need to re-invent the wheel?
Thanks in advance.

Making custom, fictional maps with D3.js

I'm kicking around an idea for a side project and am looking for advice on which direction to go in terms of technology. I've done some research already, but am still fairly confused as to what the realistic options are.
I'd like to make an interactive map based on a fictional world (think Middle Earth), including a timeline filter and a details section for additional information on an event or location.
Desired Features:
map on the left
details pane on the right
timeline slider/filter at bottom
Territories
color for political affiliation
displays details in details pane
labels
labels for cities
Hurdles:
Get a clean map image to work with
Map image into intermediate format (svg, geojson, topojson?)
Display map on webpage, style map, add animations, etc
Technologies
SVG
I'm pretty sure I could code all of this in SVG using events and boundaries. I've already been able to create SVG Paths from the image using GIMP, so converting the map into an SVG file seems plausible.
The issue with doing it this way is I would end up doing all the work the hard way when there seems to be lots of frameworks for this kind of thing already.
Kartograph
La Bella Italia is a very nice example and would serve as a good starting point. I love the trade route animations and the border styling with the glow filters.
The bonus here is that I know I can make an svg map, which is all this would need to get up and running.
My issue here is it doesn't seem like Kartograph is as rich of a platform as D3.js. I'm not sure if I can double dip and link some D3 stuff with the kartograph events. If I could, that might be the solution.
D3.js
The sliders, animations(hover and selection), and topojson seem like they would be perfect. But the main issue I have here is getting my image converted into a GeoJson format. From what I can tell these formats are strictly for Real World maps, using longitude/latitude.
So there you have it! I'm hoping there is some good news on how I might convert my map image into topojson so I can enjoy the benefits of D3.js. If not, I suppose I could just try kartograph and wire the events up with D3 controls.
Thoughts?
I'm currently writing my master thesis and I have the same topic like you had these days. I called my project Arda Maps. Feel free to ask me anything if have techonology questions.
I'm using the following frameworks/tools in my project:
QGIS
JQuery
D3.js
GeoJSON/TopoJSON
TimeGlider

Is it possibile to create a text label without using OnGUI?

I'm creating a app in Unity which is quite text heavy. So far, all the text is handled through the OnGUI function. I think I'm going to run into problems later on.
So, is it possible to create text, (using true type fonts, not 3D text or bitmaps. Not using something from the assets store either!) without using OnGUI? If so, how do you make each of the text filds independent with different styles, positions & parents?
Check the AssetStore for 2D toolkit or NGui plugin, they are both great for Ui stuff
they contain nice ways to do gradients, fonts, and aligning to screen edges or parent handles
Another option would be Daikonforge:
http://www.daikonforge.com/dfgui/
The company I work for released a game using NGUI, not long ago, but we are switching to Daikonforge now, because it's deemed more Artist-friendly than NGUI.

Resources