"Reading" the information from picture in C# [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am trying to develop code to read out positional data from a picture thats been loaded into the program.
F.E. : Imagine a picture with houses (red squares) connected with lines.
Now what i would need are the posotions of the houses and the lines in such a way that i can use that data and do more with it.
So : - Load Jpg (f.e) into the programm
- Read the picture and save postions
- Be able to work with the saved positional data.
My issue is that i struggle to find the right way to google this. Is it's as difficult as machine learing or is there a more simple way to solve this?
No need to get it explained, but more a place where i can start research this myself would be awesome!

If you want to find contours, you will be interested in Hough Transformation. Check the image on the bottom.
I recommeng getting a hang on OpenCV image processing library (more specifically the EmguCV which is a C# wrapper of OpenCV). It has a fairly big community and it's a project working for ages.
Generally contour recognition and line recognition algorithm are a good shot. You could add opencv to the search phrase.
If you want to detect lines, Canny edge detection would be a nice shot. Once again I recommend OpenCV for this task.

Related

How can I create a program which connect Flight Simulator (FSX/P3D) to my cloud storage (Onedrive)? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
Hello everyone, I'm taking a project to make a photoreal scenery for my Flight Simulator (FSX/P3D). Unfortunately, because of very large amount of data (nearly 1TB of scenery size) that I couldn't store all of them on my hard disk, I planned to upload them into my Onedrive storage. I want to create a small program running on Windows that will connect my simulator to my cloud storage to download and install scenery instantly for user that doesn't have enough storage for all scenery data.small scenery pieces that I loaded to my simulator
My scenery is divided into area described in image below (I called each rectangle is a tile).
The program I want to create will first extract current aircraft coordinates and altitude from simulator (running) and then it will download and inject tile that contain aircraft position based on aircraft coordinates and other tiles surrounding the main tile (maybe 9x9 tiles). When the aircraft position is not in current tile anymore, it will delete furthest tiles and then continue download next tiles. This activity will repeat until user exit current simulator section or out of my scenery range.My tile's area.
I haven't tried anything yet. I just made some small scenery files and tested it. Because I'm not good in coding and I don't learn much about code (at least for now)🥲 so I asked for help here. Thanks for your help 🤗. (Oh and sorry for my English).

Take sound effect from video [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I need a digital typeing sound effect.when numbers are typed,Sound effect appears in background of the video.I want to make a program that when I press the keyboard, I also listen this sound effect.How can I find this sound effect or take from this video?
the sound effect between 0:50 and 1:15
www.youtube.com/embed/kIXNpePYzZU
For the 'extracting the sound effect' part of the question, you would likely want to use an online video/audio downloader/converter. In the past, I have used youtube-mp3.org and clipconverter.cc.
For the second part of the question, it depends what exactly you want. If you want it to apply only to a specific text box in a WinForms/WPF/UWP app you are writing, this should be reasonably easy. The exact method depends on what you are doing, but involves adding a keydown, keyup, or keypress event handler to the text box
If you want it system wide, this is more difficult. Searching for 'Global Keyboard Hook C#' appears to give good results.
Once you have detected the key press, have a look at this question for how to play the sound. The answer by bporter gives the following code:
System.Media.SoundPlayer player = new System.Media.SoundPlayer(#"c:\mywavfile.wav");
player.Play();
Use this to convert the video to mp3. Clip the sound effect out of the mp3. Then play the mp3 file with your code.

Visual Equalizer Bars in C# Windows Forms [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
For my college project, I have decided to create a rhythm game which is similar to Beatmania, with notes falling from the top of the screen to an area where the user needs to make an input.
Now, for the main menu, I would like to include a visual equalizer, with bars moving up and down in rhythm with the music that is playing in the background:
This would need to be customisable to be added into the main menu (transparency so that background behind the bars is visible etc.
Currently, I have been looking all over the internet to try and find a way to program such a thing. However (unless I'm using the term wrong), all results come up with actually equalising sound based on bass etc. and since I'm somewhat of a C# beginner I am baffled as to what is said.
XNA Visual Equalizer Video - this is the closest thing I have found to what I would like. Unfortunately, I have no idea how to use XNA and there is a chance that my college will not install XNA, so working on the project will take longer, as I can only work on it at home. So Windows Forms would be preferred.
Any input on this would be appreciated. If you have any questions then please ask :)
Edit: (Not sure how to narrow this question down) - I need a Visual Equalizer in Windows Forms, does Windows have such a method, class or reference that can be used right off the bat without having to download plugins, extensions etc.?
What you are looking for is called an Audio spectrum analyzer. XNA is commonly used in games, and should just be included as a .dll in your files. I don't think you have to install that b/c you can publish XNA content as a native executable.
However, instead of reinventing the wheel, the nice folks at code project have shared a project that analyzes the frequency of sound. You should be able to modify this and get it to work to your specifications.

Automating Photoshop through ASP.NET or PHP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to start a web project in which:
User first signs up.
Uploads his desired favorite image to website.
Selects which action, filter, plugin or even photo editing feature he wants to be applied to the image and the solution came to my mind is automating Photoshop, I mean user submits his request to the server and server opens up Photoshop and automatically applies the desired operation through Photoshop to the image uploaded by user and saves and returns back the result to the user.
Now the problem is that how can i do so and automate Photoshop through ASP.NET or PHP.
Any solutions appreciated.
The very first thing you need to check out is Adobe's licensing on using Photoshop in this fashion.
Once you've addressed any licensing concerns, it would be fairly straightforward to automate. You need to write the actual photoshop automation part using Adobe's ExtendScript (a flavor of javascript) to do the image manipulation you want. If you include the line '#target Photoshop' at the top of this script that should take care of making sure Photoshop is automatically launched when you execute your script from ASP.NET or PHP.
Chances are you'll want to pass parameters to your scripts - and the only way I am aware to do this would be to write them to a parameters.xml file in a predefined location so that the script can read them in from there. I do not think you can supply them directly when you call your script.
You won't have a good way to tell when Adobe is finished with the image. The best thought I can come up with off the top of my head is to predefine an image drop location and have ASP.NET/PHP poll for the resulting image occasionally. Depending on what you are doing, and what size images the manipulation could take a significant amount of time - you may want to come up with an alternative solution.
ETA: From .NET you can also automate photoshop more directly via its COM interface. You'll need to do a bit more research to get it working, but this link should get you pointed in the right direction.

How to draw Windows-style folder icons that preview the contents [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a C#/WPF application that displays collections of components. I want to know how to create an image that is styled like the Windows 7 folder icon, where one or two of the content thumbnails are enclosed by a yellow leaf folder. (The collections I have aren't real Windows folders, and their contents aren't real Windows files)
Google Approach
I have spent a fair amount of time searching for code samples on how to do this, or anything even remotely similar. I can't find a single example of anyone doing this, which has truly surprised me. It tells me one of two things:
I can't find the right keywords to search on (combinations of: thumbnail, windows, c#, wpf, icon, folder)
Nobody else has ever wanted to do this, and that's because there is a better way of doing what I want to do.
Coding Approach
I can see that there might be a back image drawn first, and then skew transforms applied to each content thumbnail, overlaid, and then finally the front image. I've seen some code examples that show how to skew images, etc. There are some very subtle effects being drawn here too (shadows), though they could be "canned". I'm not sure how to separate the example images below into a front and back portion, though I could give it a try in Photoshop.
Windows API Approach
The closest approach I've been able to find without coding this from the ground up is to write a component's thumbnail to a real Windows .PNG file, inside a real folder, and then use Windows.Storage.StorageFolder.GetThumbnailAsync() to get Windows to do it for me. Obviously this makes me die a little inside, but it might be the quickest way to do this.
Can anyone help me? Ideally I am looking for a library or existing code sample that could show me how to generate these. Otherwise, I will attempt to code this myself using the coding approach outlined above. I'm not looking for someone to write this code for me, but I would appreciate any pointers.
Thank you!

Categories

Resources