I have a camera and I want to use C# to real-time display the object taken by the camera. In C# program I use a C-based .exe to retrieve images from the camera to one fixed folder in my computer, and then try to display and update the image (like a live video). My problem:
(1) how to update photo viewer smoothly in C# (I hate refreshing the interface) or shall I make those photos into a video first?
(2)as the pics in the folder are real-time updated, how could I make sure the sequence of playing, or avoid conflicting? I plan to keep only 10 images, and the 11th image retrieved will replace the 1st image..., I am not very clear about that...
Thanks for the reading, sorry I might have very silly questions above...
Related
I'm writing a Unity 2D game. Users can select one of 12 characters to play. The character sprites are contained in a single graphics file that I have in the Resources folder, from which I then sliced them into individual sprites. The player will bring up a scrolling selection panel (think gallery) and click on the character they wish to play.
Once my game is deployed, I'd like users to be able to add new characters, perhaps from in-game purchases.
In my old Windows version, it was simple: add the individual bitmaps into the appropriate directory, then just read all of them.
How would I do this in Unity/C# such that users acquire the new character pack and it gets integrated into the game and the sprites added to the bottom of the scrolling selection panel? I can't find any discussion of this. Feel free to point me to a tutorial, if one's out there.
The best way to do this is to save changes to the disk.
.Net has the System.IO namespace for you to use for reading and writing to disk.
Because you can write to the disk during run time there will be no problems calling those resources.
You can check Brackeys on YouTube they teach a lot if you are new to unity
here is how you save and load data in unity
https://www.youtube.com/watch?v=XOjd_qU2Ido
I want to make a game in which the player can take a picture of the view in one of the camera GameObjects whilst the game is running and then save that image and view it later in the same play session, much like taking a screenshot using a camera item in other games and then viewing it in a gallery. I was wondering if there was currently anyway of doing this within Unity as it will be a central mechanic in my game.
There are multiple ways to do this.
The simplest is Application.CaptureScreenshot, which will create an image file. To explore the screenshots, use a file explorer package, or implement your own.
The other solution is to use a RenderTexture and to export the data to a List. You can then create an UI to explore the List. The problem is that each texture will be uncompressed and kept in memory, which can become dangerously heavy after only a few screenshots. Only do this if you don't have access to files or if you only keep the last few screenshots.
we are in need of a way to record videos with sound and taking pictures inside a WPF-application. It should be able to save locally to disk. Preferably it should be able to show the content once it is saved as well, but if no such component exists, we will use another component for the playback.
I've looked around and found no real good options to do this. Some options lack the sound recording in videos, and some are just too old to get working properly (WPF has had a long run so far...)
Does anyone here has any experience in this specific area?
Got Taking Pictures and Videos working with this little documentation https://www.codeproject.com/Articles/330177/Yet-another-Web-Camera-control
If you dont tell us what problems exactly you got, or which code you already got, we can't really help.
I am currently doing a project where I am using 3 webcams and take a photo on button click. The image will be saved to specific folder on my hard drive C:\. That is working fine now. I would now like to display the image in another NEW WINDOWS FORM and I will be able to pick out eye coordinates of the person in the image saved. The purpose of picking out the eye coordinates is to ensure it is able to go through the normalization process for facial recognition purposes.
Now, my main issue is how is it possible for me to pick out the eye coordinates from an picture box in C# before coordinates would be saved to python scripts and normalization process would occur. If anyone has done anything similar, please give me some advice.
I am using IShellItemImageFactory to get icons and thumbnails for files and directories. In most cases this works great, but in some cases I get an image that is quite different from the one in explorer.exe.
Folders in explorer.exe show some of their contents represented as pieces of paper. Whenever I request an image for a directory, I get an empty folder in my program.
Videos playable by Windows Media Player in explorer.exe show as a piece of filmstrip with a thumbnail as the cell. When I request an image for such a video file I get just a thumbnail with no movie strip border.
I am sure there are other examples, but in general I just want to know if there is a way to request an image from the system that looks exactly like whatever is displayed on the desktop or in a folder in explorer.exe. I want everything to look the same so my program isn't "sloppy."
The answer is here:
http://msdn.microsoft.com/en-us/library/cc144118(v=VS.85).aspx#adornments
The adornments are the effects I am missing and it seems I would have to render them manually.
TiKu on MSDN explained this to me and deserves the credit.