15,992,699 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by C_Johnson (Top 18 by date)
C_Johnson
30-Nov-11 12:12pm
View
I hate the formatting on here at times, I will keep trying to get the code up here correctly!...
At last, these ">" characters are a pain
C_Johnson
28-Nov-11 16:00pm
View
I don't know who gave you a low vote but it's a shame you are correct the syntax is correct. 5 from me sorry it doesn't make up for the low vote,
C_Johnson
11-Oct-11 9:25am
View
lol cheers, but I always think it's better to have 1 comprehensive answer then several diluted ones. Just happy you didn't mind me editing yours and your links were to 2 great articles. :)
C_Johnson
11-Oct-11 5:24am
View
Hi, Hope you don't mind I updated you answer to make it a little more comprehensive cheers, Chris
C_Johnson
1-Oct-11 13:51pm
View
Well it was a mere suggestion and not technically a solution, you've given several good solutions and I merely wished to contribute, hope you don't mind, Cheers Chris
C_Johnson
29-Sep-11 14:21pm
View
Hi Sorry I was doing a little housework re-tagging questions and I've only just found your comment. Unfortunately I can't tell you what classes do exactly what it doesn't really matter either, if you use the basic two opencv_core220.dll and opencv_imgproc220.dll you can do most simple tasks start a project with them and keep programming until you get an error asking for cvextern.dll at this point you need to add almost all of them as it looks for all of them to work. As for books on EMGU well there are none :s however there are two for opencv if you get these from a library or on-line then they can act as a guide you will hoever have to convert the code. This is easier than it sounds all cv functions are available by calling cvInvoke.FunctionName(...) hope this helps, the links for the books are: [1]http://www.google.co.uk/products/catalog?hl=en&q=Opencv+book&gs_upl=2796l4400l2l4659l7l7l0l0l0l2l199l1051l1.6l7l0&bav=on.2,or.r_gc.r_pw.&biw=1280&bih=736&um=1&ie=UTF-8&tbm=shop&cid=7984438732523221659&sa=X&ei=JrWETvn4Bo7t-gbK7ZAa&ved=0CFQQ8wIwAQ [2]http://www.google.co.uk/products/catalog?hl=en&q=Opencv+book&gs_upl=2796l4400l2l4659l7l7l0l0l0l2l199l1051l1.6l7l0&bav=on.2,or.r_gc.r_pw.&biw=1280&bih=736&um=1&ie=UTF-8&tbm=shop&cid=15231969889310013850&sa=X&ei=JrWETvn4Bo7t-gbK7ZAa&ved=0CFAQ8wIwAA
C_Johnson
26-Sep-11 5:23am
View
A good Image processing library you may want to try is EMGU it's a good c# wrapper for opencv it has inbuilt functions for applying gaussian filters etc http://www.emgu.com/wiki/index.php/Main_Page
C_Johnson
20-Sep-11 16:57pm
View
Converting an integer to a double using Convert.ToInt32 is not a time efficient method. Although it does work it is not recommended, using a cast will do suffice e.g
myInt32List.Add((int)item);
This will allow the value to be directly copied to a new memory position. The reason you need to use the cast is because converting from double to a integer will cause a loss of data the cast says you accept this loss. The Convert.ToInt32 requires the data to be a transferred and operated on externally to produce the same results. In this case it is superfluous to the outcome.
C_Johnson
20-Sep-11 12:52pm
View
I have written an article to help you and others ins setting up an EMGU project. It is available here
http://www.codeproject.com/KB/cs/EMGU_Image_Processing.aspx
I hope it helps
Cheers
Chris
C_Johnson
19-Sep-11 7:12am
View
Added a little to provide better support hope you don't mind Chris
C_Johnson
19-Sep-11 6:59am
View
None of these are references to using EMGUcv
C_Johnson
14-Sep-11 17:26pm
View
Mainly for others if you did want to approach writing the algorithm yourself then you will need to read J Cannys paper A computational approach to edge detection available here as it is one of the most effective:
http://www.limsi.fr/Individu/vezien/PAPIERS_ACS/canny1986.pdf
Effectively what the algorithm does is examine each pixel with a set of 3x3 masks (i.e 1 pixel and the surrounding pixels) Each area is examined for edge cues at 0,90 and 45 degree angles. Effectively looking for a change in gradient. If there is a significant change in gradient (this is the thresholds you adjust) then an edge pixels is recorded as a 1 in a blank image. What you end up with is a binary map of edges. The code is not as easy as you would expect to write. On top of this you need to include a gaussian filter to remove noise and histogram analysis to further account for noise variation in pixel intensity's. As I said using existing libraries such as EMGU and openCV are far more efficient else you will be writing code again. Alternatively there is the AForge libraries that are simpler to work with but are not as advanced or powerful. See this article
http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx
Take Care
C_Johnson
13-Sep-11 15:51pm
View
glad to see your giving it a go. Opencv is a huge library for image processing and EMGU helps port that over to c#. It can be a little tricky ensuring you have the correct .dll's in your project but when you do you will not look back.
A tip if you get any errors have a look at the what the cause is as it will tell you what dll is missing and either add that to your output folder or add it to you project as an item and set its properties to copy always.
If you get stuck then just ask me, the community here or at EMGU and we'll sort you out.
Take care
Chris
C_Johnson
13-Sep-11 11:42am
View
Ok the process evolved here is "edge detection" its well document however writing the algorithm out your self us unlikely to be as efficient as well used ones such as canny, prewit, roberts and sobel. Download EMGU and use there inbuilt ones:
http://www.emgu.com/wiki/index.php/Main_Page
Look at the Camera Capture and the shape example provide in the examples folder and a few of the others here's an example:
http://www.emgu.com/wiki/index.php/Shape_%28Triangle,_Rectangle,_Circle,_Line%29_Detection_in_CSharp
This is the important line:
Image<gray, byte=""> cannyEdges = gray.Canny(cannyThreshold, cannyThresholdLinking);
It's very easy to use and will be exactly what you need if you need more help please feel free to ask
Cheers
Chris
C_Johnson
13-Sep-11 8:22am
View
Yes your right and this method would speed up the system http://www.bobpowell.net/lockingbits.htm shows how to do this if anyone's interested. You could speed up the process further by using .NET parallel architecture using System.Threading.Tasks; and implementing a Parallel.For loop and addressing to data to a specific array location. You could also use EMGU a c# wrapper for opencv image processing library which is far more optimised than approaching this in c#. All valid solutions but I provided the simplest. Optimisation of the code can only be applied once you have code that works and I wasn't sure what code base was being worked with so please forgive the simpler answer.
C_Johnson
6-Sep-11 5:43am
View
Thanks I tried to see if this was the problem but it didn't work when I selected and reselected it I presume it was just a browser issue, Many thanks for reformatting it correctly - Chris
C_Johnson
6-Sep-11 3:36am
View
Please excuse the <pre lang""></pre> tags if they are visible as they are meant to show code blocks however something must have gone wrong - Cheers Chris
C_Johnson
25-Nov-10 12:33pm
View
Hi, thanks I will do.
Would you mind telling me what virus checking program your running as neither Sophos, AVG or Norton can find this virus and I am deeply concerned. Could you also provide is possible the file this virus is associated with.
Many Thanks Chris
Show More