x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AR image detection question

Hello,

I trying to develop on ARKit with image detection. I succeded to detect one image like in the article of joe Graf (https://docs.unrealengine.com/en-us/UE-Dev-Blog/ARKit-15-Image-Detection-in-UE4-420) But I stumble in front of several problem

  • When try to have several image in the database for candidate image, I add a switch that spawn a different class actor according to the Friendly Name return by the ARTracked Image from the geometries, but it always take the last one in the switch, and never spawn the other one. Maybe it's me and I dind't understand the Event Tick, how it works. I also try to transform it in a function and promote the friendly name and the class that will spwand, and duplicate in series the function on the Event Tick and it's the same it only take the last one.

  • How can I update the position of the spawnd class after it's spawnd when the image is moved in the real world, or when the ARSession update the anchor postion.

Product Version: UE 4.20
Tags:
more ▼

asked Oct 10 '18 at 08:29 AM in Blueprint Scripting

avatar image

j.chandelle
1 1

avatar image jstantonsmith Dec 13 '18 at 01:56 AM

I am having a similar problem. I paired it down to the following simple bpalt text

When I look at either image first I get a clean print string. alt text

But after I look at the second image it prints both the first switch and the second switch string. Is there a way to fix this so it is only calling one element of the switch at a time? I have tried with do once as well as branch statements. alt text

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hi, verify that you have different classes for different images and that you did not miss a break in a switch statement. If you only want to have one object per image, then spawn one when the image is initially detected, and update a position of that actor on later detections.

more ▼

answered Oct 10 '18 at 12:32 PM

avatar image

MrMcKvarz
156 1 4 13

avatar image HullzAngel Dec 11 '18 at 12:02 PM

I would suggest not doing it this way. I haven't found a seamless way to update a tracking position of a candidate image as of yet. But calling for it to be moved each time it is recognised by your device doesn't work out of the box. It seems to update every half second or so providing you with a very jagged user experience that doesn't really achieve what you want.

However I do think this is the correct route to go down as with the transform pin, Unreal does a good job of getting the position correct. It's more a case of the rate at which it refreshes the image transform. If this can be increased, you may be able to get what we're both looking for.

avatar image MrMcKvarz Dec 11 '18 at 04:20 PM

You could use smoothing updates and not set the position straight from what has been detected.

avatar image HullzAngel Jan 07 '19 at 11:00 AM

You could, but it would not make it real time nor would it work very well. It wouldn't move along with the image it would instead move around a second later once the image is recognised again. The lag would make the experience infuriating. The rate at which that image is tracked needs to be increased somehow and that's not available out of the box.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question