User Profile

Collapse

Profile Sidebar

Collapse
David24
David24
Last Activity: Mar 12 '08, 01:59 AM
Joined: Jan 31 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 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...
    See more | Go to post

  • 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...
    See more | Go to post

    Leave a comment:


  • 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....
    See more | Go to post

    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...
    See more | Go to post

  • David24
    replied to Get the average of points
    in C
    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
    ...
    See more | Go to post

    Leave a comment:


  • David24
    replied to Get the average of points
    in C
    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......
    See more | Go to post

    Leave a comment:


  • David24
    started a topic Get the average of points
    in C

    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;
    ...
    See more | Go to post

  • 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
    ...
    See more | Go to post

  • David24
    replied to Motion Tracking Auto Turret
    in C
    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;
    ...
    See more | Go to post

    Leave a comment:


  • David24
    replied to Motion Tracking Auto Turret
    in C
    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))
    See more | Go to post

    Leave a comment:


  • David24
    replied to Motion Tracking Auto Turret
    in C
    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
    ...
    See more | Go to post
    Last edited by Ganon11; Jan 31 '08, 08:58 PM. Reason: had to split up code so it would show

    Leave a comment:


  • David24
    replied to Motion Tracking Auto Turret
    in C
    how's anybody supposed to help me if you guys remove the link to the source code? that's absolutely asinine.....
    See more | Go to post

    Leave a comment:


  • David24
    started a topic Motion Tracking Auto Turret
    in C

    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...
    See more | Go to post
No activity results to display
Show More
Working...