How to Get Head Tracking Output Cordinates? - c#

Anyone know a binary that exports the output of the coordinates? I am looking for something related to several days, I have already visited dozens of sites, downloaded dozens of projects and researched dozens of tutorials, but I can't find anything that really works, I'm trying to create an application similar to VTuber (Virtual Youtubers) in Construct 2 where Head Tracking is crucial to make movement work, I understand the complexity of developing such an engine, but I also imagine that there is something easily accessible out there on the internet, for example...
I found this website that in the lower right corner has the information I would need, but it is a website, it is not quite a binary that I keep monitoring the output to make the character animate inside Construct 2...
Site: https://www.visagetechnologies.com/HTML5/latest/Samples/ShowcaseDemo/ShowcaseDemo.html
I also found a very cool project, but it is also a website, although I really liked it because it is very light running.
Site: https://www.auduno.com/clmtrackr/examples/clm_emotiondetection.html
I also found a project called "ARKitFaceTracker" but it was made for Unity and the level of complexity of the project is discouraging for me.
Currently a project already exists that uses "ARKitFaceTracker" is PrprLive, it was made at Unity and it would be perfect if you exported the horns in a text file, so that you could try to make a lighter version and in my own way, but I just I know how to program in VB.Net and a little bit of C#, but this "Face Camera" was basically what I wanted, but in a way I just used it as "engine", to get the direction coordinates of the head.
In short: basically what I'm looking for is a binary executable that can export the only the movement (left, right, up and down) coordinates of this "Head Tracking" so I can pull this "Output" (txt or json) through Construct 2 and make it animate in real time. I really wanted to make it happen, mainly because I have been researching and searching the internet for several days and it has been a few hours since I crashed and I came here wanting to know if you could help me to continue, because I really don't know what else do, thank you very much.

It can be easier if you modify from projects like this:
https://github.com/1996scarlet/OpenVtuber
https://github.com/virtuber/openvtuber
Both these solutions separate the face tracking module and the visualization module. It should be easy for you to set up the python servers and request coordinates from them.

Related

different images from different point of view

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

How to Lay Out C# Windows Forms Correctly, and allow for Scaling?

I am one week into learning C#, and I am currently working on a large application, as my C/C++ and Python knowledge comes into play - one problem here, however: C, C++ and Python don't have a GUI for creating GUIs.
I noticed that simply placing controls on a window won't work, and instead they need to be layed out in GroupBox-es and TableLayoutPanel(s) - and TabControl(s).
My aim is to achieve scaling, so at any size the program will look similar (this is very important for this program specifically).
At the moment, resizing makes my whole program flicker, and it doesn't even work properly.
I managed to sort-of do this in a previous program, however I've lost it at this point and have no idea what I'm doing.
Here are a few screenshots of my current work:
https://justpaste.it/119kb (screenshot links pasted on this website, as StackOverflow is not letting me put more than 2 links or images)
As you can see, it doesn't scale properly.
(as bad as it may look, I'm working on it - I haven't released the first version yet, and I will definitely revamp the whole program before release, just trying things out here)
Could someone enlighten me with tips on how to scale properly or inform me of something I'm not using?

Adding collision to .tmx

i recently downloaded "Tiled Map Editor" - because i heard it was a great tool for making maps. I also got a .tmx "compiler", well, something that made the .tmx usable in XNA.
I've created a map and imported it and it worked fine, but now the tricky part comes...
If i add a collision layer in "Tiled" and adds a tile that indicates block part, how would i get data and values, and how would i be able to use it in XNA? And how would i make so that the player spawns in a certain location, and also, how do i add things as events, and movable objects?
You don't have to tell me everything that, but it would be cool if you could give me an idea on how to get data and values from the .tmx and convert it into rectangles or such things^^
Thanks in advance!
I know nothing about tmx file but a little about collision.
I'm going to take a punt that your ".tmx "compiler"" is something that allows files of this type to be included in the content pipeline. Somewhere in this build process will be the vertex data that you can use to construct the collision primitives (shapes) for collision detection later.
ASIDE: it took me ages to get my head around the content pipeline - not for the faint hearted but the way to go. They are samples on the XNA website to get you going

Beginner C# applications [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I just started learning C#, and I want to start making some small applications that are easy, but powerful.
Does anyone have any projects ideas? I'm interested to hear what you have in mind. Most of my experience is with HTML, CSS, JS, PHP.
Thanks
What do you like doing? I find games are always a cool place to start. If you like game-development you can do stuff like pong and pacman, but you can still have a lot of fun just making board and card games without much of the graphics complexity.
Here's some to get you started:
easier: tic-tac-toe, connect-4, go fish, black-jack, candyland, various solitaire games
medium: monopoly, poker, go, checkers, Yahtzee,
harder: scrabble, boggle, chess, Magic: The Gathering
here's different levels of difficulty:
design the logic. For example, make classes and methods to represent the board, properties, and the players in monopoly.
start making a gui. Make the game actually playable!
add AI and computer controlled players. Obviously AI is a huge subject, so there's many different ways you can go.
see here for a ton more projects on various topics
Since C# can be used in multiple types of applications, I'd try to do the same task in each. Perhaps a simple app that connects to a database and performs a lookup based on user input. Maybe connect to the "pubs" database that comes with the SQL Server samples.
You could do this as:
Winforms
ASP.NET WebForms
ASP.NET MVC
Dynamic Data
WPF
A Console app
using
Standard ADO.NET
LINQ
Entity Framework
You can even create a Windows Service that uses WCF, and a WinForms or ASP.NET front-end that consumes that service.
The idea is to get as many TYPES of apps under your belt as possible, so you can see how each is similar, and how each is the same. It will also help you get a better understanding of the "religious wars" over "which is best, Web Forms vs. MVC", etc. The ultimate answers to those "holy war" questions is invariably "what you're most comfortable with". There's nothing like having actual experience with the various options than to actually write something, so a nice, simple app in all of the available flavors would be a very good start.
And finally, since I listed so many things, here are some great starting points for everything I mentioned. There are videos, walk-throughs, etc to help you on your way.
http://www.asp.net/
http://windowsclient.net/default.aspx
http://msdn.microsoft.com/en-us/beginner/default.aspx
How about a scientific calculator? It'll give you basic experience with GUI building and event handling, it shouldn't be too hard to knock one up and most of your focus will be on the language rather than complicated algorithms (which is what you want when you're just starting to pick up a language.)
I've always heard that a simple game like checkers is good place to start. It lets you handle things like:
Separation of Model from UI (possibly
with a view model).
Skinning of controls or custom controls
and is easy to understand and test.
You can try to create something likes todo list. You can to provide a lot of custom feature for it (save/open data files, import to other formats, UI)
A good place to start is something like a calendar/todo application.
You won't beat all the great programs already out there that solve this problem, but you can start with a very simple but functional program, and add a feature a day for the rest of your life without running out of things you can do.
This gives a lot of opportunities for using different UI elements, doing some custom graphics rendering, serialisation/streams/io, database access, and even synchronising with web-based calendars, etc. i.e. It's easy to find a use for many different .net technologies within an application like this, but you don't need to use them: you can write a basic "useful" application in only a few minutes and keep adding to its facilities to learn new technologies.
Personally, something I'd like right now is a program that performs batch file management operations...
Sorting files into subfolders based on date or name patterns;
Renaming files based on user-defined patterns (e.g. add or remove a prefix from all filenames)
Renaming files based on metadata, if you can figure out how to read it (e.g. mp3 ID3 tags)
Then again, maybe this is too advanced. Or boring. I always find it fun to write a game that is a clone of an existing game, but add a twist. Like 3D tic-tac-toe... bad example maybe, but you get the idea.
Write a graphical dice roller simulator. It should be one window and when I press the "Roll Dice" button it simulates a roll of the dice, showing me an image of how my dice landed. And bonus points if it makes a nice dice roll sound. Extra bonus points if you let me choose how many dice to roll.
I expect to see this by tomorrow afternoon.
Good luck.
Maybe a little more advanced, but I enjoyed creating a little cheating program for playing the bejeweled blitz game. I followed Mike Vallotton's blog to get me started. it's here
Another good one would be to count the number of words in a text file.
Add a little more functionality to it by searching for keywords and returning how many of those were found in the text.
Start with writing a simple program using Form Application using a button and when clicked: Open a MessageBox saying Hello World. Then going over to new stuff like a webbrowser and then obtaining the source code from the site
3 basic steps in learning c# by webbrowser development:
1. create a basic browser that opens up a hardcoded site (site preprogrammed, not decided by user)
2. user controlled, textbox that the user can decide webpage with.
3.pulling out source code and changing every picture on a page for example. That will combine HTML and C# and since you have experience with HTML, changing the client side of the WebPage is good practice.
Good Luck :) Look up ThenewBoston on youtube, really great tutorials on C#
got a couple ideas:
you can make a pretty basic calculator [console application or windows form application]
you can make a dice (give random number between 1-6 or a random number between two numbers selected by the user.
a magic 8 ball, this uses the dice in the previous dot point, but instead uses the randomised integer and prints out the corresponding string.
you can make a planner application (an app that saves data such as todo list on a .txt file, etc).
you can also make a desktop assistant (i made one recently), that recognises voice and speaks to the user. It can also obey simple commands.
if you want to go deeper, you can try coding using C# to create unity games, i had some experience in this, it is very easy (got pretty good at it after reading some documentation and watching some tutorials).
but if you are just starting out, then i recommend you to work your way upwards and start off with making something simple.

Dynamic user-interface, WPF or not?

I'm currently working at a application that helps people understand how to do there job. You can see it as a personal coach that guides them trough all the steps they need to do that no normal person could keep remembering.
In my previous application we had the ability to show the user up to 4 pictures (what proves to be more then enough). The application would load the data and see how many pictures where in every instruction and then sort out the picture in the best fitting way without messing up the scale and resolution of the pictures. This all was done with GDI+ and worked very well.
Ofc, change is something that always happens, my bosses came up with some great ideas. So they want to be able to see movies on the screen, animated gif's, 3D models that can rotate or animate. So I think we had pushed GDI+ to it's limits and it's time to look for something different.
I have heard and readed about WPF but have no experience with it. Is it even possible to do all what I ask in WPF? And what about the old picture-merging thing I wrote, can we also get it done in wpf? I tried to make some things working but I didn't went as smooth as I hoped.
I'm also concerned about the fact that the interface needs to be dynamic, the one moment it should be showing picture with some text above it, the other moment it should be showing another text with a video under it.
I would love to hear some opinions here and if you got some other suggestions I should look into pls tell me. Thnx in advance
PS: If WPF is the choice, should I convince my boss to change to .net 4.0?
Although my answer can be termed subjective, I find WPF better than GDI+ anyday. You can do everything you can in WPF which you have done/could do in GDI+ (apart from pure games/game engines). If you can afford the steep learning curve of WPF, I think it will be better investment as this technology is not going anywhere soon.
As for .Net 4.0, WPF 4.0 does introduces some important functions in 4.0 (specially easing functions for animations) but there is nothing you cannot do without if you are using 3.5. I won't recommend 3.0 though mainly because of performance in animations.
WPF is up to the task, but you could also check other options.
You could go web based, and have either an XBAP (WPF in the browser), or Silverlight/Flash app.
Silverlight/Flash doesn't require that much from the client (to install), and is easily updatable, and both can do the job.

Categories