I want different images to be displayed from different point of view. For the whole concept explaination please look at the images. they explain my idea/query!
As in the first image you see that there are three people at different angle looking at the monitor. Now i want the webcam to track the eyes and show the particular defined image to the user> For example: If user is at 45 degree angle then show image1.png
Depending upon the user's prespective of watching. The computer should show the image.
(the lady is the game character for representation purpose)
Can you please guide me on what steps can be taken to accomplish this? Is there any plugin available for unity that tracks faces? Please guide me
Also thanks for the compliments on my sketching skills xD
Stackoverflow is not really meant to recommend plugins, since the choice is usually opinion based so there is no exact answer.
That being said, on of the most common used API for computer vision (meaning interpreting images, including face recognition) is OpenCV, so that could be a good start for you to look at that.
And fortunately for you, there is a Unity plugin for OpenCV
It is too broad to give you more details about how it works here. You should try to make it work, and if you have a problem with your code, open a new question with the code portion that you struggle with.
PS: nice sketching skills
Perhaps easier option would be to use Kinect
(trying to detect face or eyes from that far might be shaky?)
With Kinect you can get skeletons for multiple people, and getting the angle between target and those kinect avatars would be easy.
If there is no space to put kinect in good position,
could consider placing it on the ceiling above (and then use depth data only to detect people in its view)
Only issue is that apparently Microsoft has stopped Windows kinect support,
so you would need to find 2nd hand versions.. (Unity Asset store still has some kinect plugins and examples available)
https://www.polygon.com/2018/1/2/16842072/xbox-one-kinect-adapter-out-of-stock-production-ended
Or look for kinect alternatives that work with unity, try RealSense cameras:
https://www.intel.sg/content/www/xa/en/architecture-and-technology/realsense-overview.html
Related
I am trying to create a C# software that can control the CNC machines, First I am trying to create a 3d Space area in the PictureBox (or Pannel), I have gone through the internet and reached about this and I got one video. He made a 3D place in the form space, and it was a good tutorial but I don't know how to create a coordinate system in that space as you see in the image that I have given below.
Pls, Help me to do this.
enter image description here
enter image description here
If I get the proper solution for this, in the future I can develop this project.
Thank you, guys...
Update:
Actually, I have designed a C# program That controls the CNC machines,
For example, we can take UGS, There is much software out there but I need to create this in C#. The Only thing I am suffering here is the 3D coordinate system. How to create the Axis diagram in 3D.
Example: Planet Cnc's "Cnc USB Controller" I want to create this software in C#.
Thanks...
Build a CNC CAD programmer from skratch it's not a trivial activity.
You should be skilled in:
Math and Geometry in particular (vector/matrix calculus, base transformation, ...)
A language to comunicate with CNC (maybe G Code)
3D file formats
etc.
This is old, and you should have fixed the problem by now... but I hope to help someone in the future.
Have you seen Helix-toolkit? This library provides easy 3D camera and object controls for .Net Framework. I used this library in WPF C# for an application that generated G-Code for a CNC machine... this saved me in the simulation.
You can import 3D models (.3Ds or .obj) from your machine to 3D Panels (HelixViewport3D) and use them in the simulation or create meshes on demand in C#.
The documentation is simple, but on GitHub there are lots of examples.
Helix-toolkit on GitHub
I have a programming project using Kinect Xbox one sensor. The project is mainly about turning any surface into an interactive touchable screen. I have collected all the hardware including the projector. In addition, I have done my research and downloaded the related packets such as Visual Studio in order to start coding in C#.
So, my question here:
Is there any any library that I could use which may facilitate me to determine the angles/depth of the surface?
Plus, I don't have a fully vision of the steps which need to be done for the next steps, so I would really appreciate it if there is anyone could draw me a small map for me for this project.
If you have trouble with getting started with kinect go through this
Quick start series
and you also might want to capture the depth of objects. For that try to use Kinect's depth image streams and the sdk itself does not provide much happy methods. You will have to do some image processing on that gray scaled depth stream. Then you can find the edges of a single object in different depths.
Soon I will begin development on a mobile application in unity 5 that will use the devices native camera for the user to view. The big thing here is that while the camera is up, I need it to be able to recognize a person's face and compare it to a stored image of a face that will already be saved on the device to see if it is a match.
Also, I need to be able to recognize whether the center of the camera is pointing at a part of the person's body.
So all in all it needs to recognize a person's face and run a comparison on it, and if the face is recognized, it will then determine if the center of the camera is pointing at a part of the person's body.
My question is: Is there a good plugin for this sort of behavior? I know it will be a bit extensive but I am wondering how I would get this done. I am more focused on just facial recognition than the body issue so if that is the easier issue than I am good with focusing on that.
It sounds complicated and it envolved alot of diffirent processing techniques to achieve some resonable results. If I were you I would look into using the Face recognition module that comes with iOS and integrate that as a Native plugin, they can be used to extract and locate a face on a photo/feed. Then you got a photo next I would to is to rotate the photo and prepare it for comparison with other photos, that is "normalized" , you should normalize the colors and align it as much as possible. The final and most complicated step would be to analyse the face and compare with diffirent faces. I would recommend that you use OpenCV as suggested for that. I would try and analyse the structure of the face based on positioning a simple structure on the eyes, mouth, chin forehead and jaws, try and calculate the distance between these values and then you will have a way of roughly sorting the images that you want to match the face with since it doesn't make sense to do further processing on face images tha varies too much. Final step i would try to detect the eye color, the color of the skin and various other factors, these combined will give you some stats that can be used to determine how equal these photos are.
Cheers
Not sure whether this is you want. There is a open cv plugin with high price $95 on asset store: OpenCV for Unity
And here is face recognation demo video: https://youtu.be/u5aDbn5nRbY
Hope it will help.
I want to develop a "People Counting System" using OpenCV (or Emgu CV).
Please guide me on how to implement or lead me to some examples or open source projects.
(I have done some work: extracting diff then threshold to delete background, using motion history and like that; still no good results.)
Edit 1: I am counting a high people flow (a dozen of them may come through simultaneously).
Edit 2: It must be at least 80% accurate. People are walking through a door that is almost 5 meters wide. The problem is I have no control on the position or angle of the camera. Camera is shouting the place from a 10m distance at a 2.5m height.
Thank you
If you call a people counting system a system that counts people that are in a room then I recommend you implement the hardware with a microcontroller with 2 lazers(normal lazer toys work) and 2 photoresistors.For the microcontroller I recomen you use Arduino.And then make an C# application that has a SerialPort object and reads the data that the arduino sends through the USB.The arduino will send 1 for "someone entered the room" and 0 for "someone left the room" for example.Then the logging and statistics can be done easily in C#.
Arduiono Site:here
Photoresistor for $1: here
This solution is alot cheaper and easyer to implement than using a camera that is with a fairly good quality.
Hope I helped you.
Check out the HOG pedestrian detector that comes with recent versions of OpenCV (>= 2.2).
See modules/objdetect/src/hog.cpp and samples/cpp/peopledetect.cpp in the OpenCV sources. Unfortunately there is no official documentation about it yet.
This would help you to count moving things including people: Motion Detection project on CodeProject
Are people the only kind of "entities" in the scene? If this is not the case, do you care about considering a person some other kind of thing that moves through the scene? Because if that is the case, you could just count blobs that come in or come out from the scene. It may sound a bit naive but I will take some kind of motion image, group motion pixels by distance in clusters. Your distance metric could take into account some restrictions, such as that people will "often" stand so pixels in a cluster should group around some kind of regression line (an straight-up line if the camera is aligned with de floor). It shouldn't be necessary to track them in the scene, just noticing when they enter or they leave, though you'd get some issues with, for example, people entering on their own in the scene and leaving in pairs or in groups... Good luck :)
I think if you have dense people crowd with a lot of occlusions you have to use some machine learning algorithm, for example you can use Implicit Shape Model for features.
It really depends on the position of the camera. Assuming that you can get front facing profiles of the people in the images:
This problem is basically face detection and recognition.
There are many ways to go about finding faces, but this is the approach that I'm a little more familiar with.
For the face detection you need to do image segmentation on the skin tone color. This will extract skin regions. [Arms, the chest (for those wearing V cut tops), face, legs, etc] Then you would need to line up the profiles of the skin regions to the profile of your trained faces.
[You'll need to use Eigenfaces to create a generic profile of what a face looks like]
If the skin region lines up and doesn't devate too far from the profile, then it is considered a face. Once the face is confirmed, then add it into the eigenfaces data store [for recognition]. To save processing you might want to consider limiting the search area if you are looking for a previous face. [Given the frame rate, and last time the person was seen]
If you are referring to "Crowd flow" I think you just mean the density of faces in a crowd.
Now you've confirmed that a moving object in the video is a person. Now you just need to note that and then make sure that you don't consider them as a new person again.
This approach: Really depends on your ability to detect face regions. This may not work if the people in the video are looking down, not fitting the profile of the trained data etc. Also it may be effected if a person puts on sunglasses within the video. [Probably would be considered a "new face"]
I'm looking for a solution which will allow me to grab a picture from any camera (or many cameras at the same time) connected to the PC running under Windows. This solution should be provided with API so I could somehow control the Video with it's resolution, quality etc.
I'm not sure where to look for...
I prefer free solution, however those with reasonable prices would be also much appreciated.
Do you know any, if so are You able to point it's strengths and weaknesses?
Most scanners and cameras support WIA, which is probably a good place to start. There are plenty of examples of how to use WIA in .net, so I would start there and see if they meet your requirements.