Ask Your Question
0

How to detect color during target detection time and put that on the 3D model to be augmented?

asked 2016-07-12 13:05:47 -0500

M Fahad Minhas gravatar image

I am working with vuforia's unity package and OpenCV for unity at the same time. My goal is to make the texture of 3D models at the runtime, i.e whatever user colors the target object, that color at the same region should be displayed on its 3D model which is going to be augmented.

I know this can be done using OpenCV with vuforia concurrently but i'm not getting the right direction

Can someone guide me on this?

Kind regards, M Fahad Minhas

edit retag flag offensive close merge delete

Comments

Hello Fahad Minhas.... Have you found any solution for above issue???? Plz kindly inform me ur ans on my mail id ankuzambre@gmail.com Even m stuck on same issue.. Waiting for ur reply..

Kind regards, Ankita Zambre

Ankita Zambre gravatar imageAnkita Zambre ( 2017-02-26 23:32:08 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-07-12 19:04:48 -0500

Tetragramm gravatar image

I assume you have a region that is the target object? Convert the image to HSV, then take a 3 channel histogram. Depending on what exactly you mean by color, take the most common H, HS, or HSV value and use that. That is, the bin of the histogram with the highest value.

HSV is described here, so you can figure out which of these you actually need.

edit flag offensive delete link more

Comments

Thank you for your answer, that is one good hint.

Actually I am having trouble using the OpenCV package for unity with Vuforia SDK. Considering your answer, after doing what you have proposed, from these colors acquired of different colored regions, i need to make the 2D texture out of it and apply that texture to the 3D model of this object and then augment it.

Here is the link that would demonstrate better of what I want to achieve, maybe I am not explaining it correctly. Here is the video link to it.

M Fahad Minhas gravatar imageM Fahad Minhas ( 2016-07-19 05:25:57 -0500 )edit

I just need the whole right directions for completing this project for my FYP and I am stuck.

M Fahad Minhas gravatar imageM Fahad Minhas ( 2016-07-19 05:27:28 -0500 )edit

Well that doesn't appear to be doing any color detection at all. Just taking the area corresponding to the 3d model and using it straight as the texture. Take a look at 0:52-0:54, you can see where it stretches.

Just take your known shape, (which you know because you have all the line drawings in your library), cut along the lines (virtually) and paste it as your texture.

Tetragramm gravatar imageTetragramm ( 2016-07-19 07:42:18 -0500 )edit

:o Yes you're right i guess This is in fact a good idea to just get the frame and cut out the target's region and use the same as texture. Here the problem would be to know the location of target and region to cut because it would be different in every frame. But still I would give it a try, Thanks a lot :)

M Fahad Minhas gravatar imageM Fahad Minhas ( 2016-07-19 07:53:21 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-07-12 13:03:39 -0500

Seen: 729 times

Last updated: Jul 12 '16