Reputation: 447
I am working on AR project where i need to fetch both horizontal and vertical both surfaces including walls and put ar object on that surface. I have tried following thing to achieve that. But some how it doesn't detect walls or any vertical surface. Following code i have implemented.
Custom ARFragment that extends ARFragment.
class CustomARFragment : ArFragment() {
override fun getSessionConfiguration(session: Session?): Config {
val config = super.getSessionConfiguration(session)
config.updateMode = Config.UpdateMode.LATEST_CAMERA_IMAGE
config.planeFindingMode = Config.PlaneFindingMode.HORIZONTAL_AND_VERTICAL
return config
}
}
I have extended this class to achieve ar in my project. Still i couldn't able to fetch vertical planes.
Upvotes: 4
Views: 2059
Reputation: 5392
The vertical detection is really bad.
You need posters, or cupboards or even a running TV. Something that can distinguish points on the wall. Otherwise it fails miserably. Try a few scattered sticky notes.
AR is horrible at Vertical mono-color detection using standard cameras without the additional depth sensors. You can use various techniques from horizontal planes in the view, to color differences, to Rays to the floor to attempt to overcome this, but it is no easy task and doesn't make for the best user experience. So as much as we are all dying to do some vertical wall detection and AR placement without having hacky work arounds to identify it, it's just not there yet.
Here is a nice write up from Griddyanmics that gives some great details. https://blog.griddynamics.com/how-arkit-and-arcore-recognize-vertical-planes/
Upvotes: 4