User Profile
Collapse
-
unsafe code i modified isn't working quite right.. (C#)
my best attempt to get the following code to store 2 ints representing the average location of x and y coordinates is throwing NullExeption errors. this is unsafe C# code by the way. i'm a novice so hopefully you will notice some obvious, glaring, simple solution for this. it's very important to me that i get this working. it would be a better motion detector than the one i currently use on my motion tracking turret. (although the old detector does... -
the chip is a miniSSC servo controller. the reason we don't use auto fire is that people forget auto fire is on..the turret is very indiscriminate about who, or what, it's shooting... -
as it clearly states, I built the turret (by myself, from material from home depot and 3 servos). jeremy and i wrote the software. in the video it clearly states that the turret is aiming by itself. therefore, you did see the 'auto track' mode working....Leave a comment:
-
New Motion Tracking Auto Turret Demonstration Video
It's on YouTube and the video id is aNTH_8IA0XQ or you can just search for "Motion Tracking Auto Turret"
Check it out and let me know what you think..
The Video demonstrates how the Turret will follow the center of the largest moving object in its field of vision or it can be manually aimed. It also has target anticipation features for improved accuracy of faster targets. It can be fired manually or automatically... -
ok, here's my question; how would i store the red pixels this motion detector draws as a list of points so i can then average their location? this code runs as unsafe so that it can run very fast and uses address and indirection operators which i vaguely understand..
this bit of code is hard to comprehend. i've never seen an address operator used like this (*motion & 1). i don't understand what the code is doing here
...Leave a comment:
-
here, i'll repeat it for you; i need to get the average of points and save them as integers targetx and targety. when i say points i'm talking about the red pixels this code draws as a representation of the difference between 2 frames it compares. if, after reading this and the first post a few times you still don't understand, you are likely not qualified to solve the problem anyway......Leave a comment:
-
Get the average of points
i am modifying a simple motion detector from the Aforge Library. It simply compares 2 frames and draws the difference as semitransparent red pixels. I need to store the (constantly changing) average location of these red pixels (representing motion) as int tartgetX and int targetY. Here is the code:
...Code:public unsafe void ProcessFrame(Bitmap image) { BitmapData imageData = null; -
how would you share a variable between 2 classes in VC#?
i'm trying to share the variable: target
This section of code:...Code://draw rectangles for the edges filter if( coordinateList.CalculateEdges().Length > 0 ) { using( Graphics graphics = Graphics.FromImage( newImage ) ) { graphics.DrawRectangles( new Pen( Color.Blue, 1 -
no problem.
...Code://Method GetTarget (i created) public static Rectangle GetTarget() { //find the average x coordinate int x = coordinateList.XCoordinate / coordinateList.XCoordinate.Count; //find the average y coordinate int y = coordinateList.YCoordinate / coordinateList.XCoordinate.Count;Leave a comment:
-
there's the code. we'll see if anyone can solve the problem.. (line 167 is the method i tried to create (which doesn't work))Leave a comment:
-
if i were an experienced programmer i would want the whole solution so i could actually test my modifications for functionality.. .that's fine though, i'll post the code. now, OF COURSE, the ENTIRE code needs to be posted because anything less would hinder comprehension. so instead of a simple post with a link to the source code, here's the annoying, tacky, eleventybillion page long code pasted to this post.
...Code:using System; using
Leave a comment:
-
how's anybody supposed to help me if you guys remove the link to the source code? that's absolutely asinine.....Leave a comment:
-
Motion Tracking Auto Turret
source code: <link removed>
comcast wont allow .rar (because they suck) so you have to right-click save page as and rename to .rar. i tested this twice and it works fine.
this motion detector has 2 filters, edges and rectangles. this is concerning the edges filter only, it compares two bitmaps (converted to grayscale), gets a list of x and y coordinates, and draws tiny rectangles at each coordinate which represent the...
No activity results to display
Show More
Leave a comment: