|
AreJay wrote: This is an extreme example... I am looking to gather an x and y location (reading ever x milliseconds) of the object as it travels around a track.
Well, your problem is that you can track AN object, not necessarily THE object you want. What you pointed out only recognizes that a blob exists against a rather uniform background, namely a bright white, or dark black, blob against a gray background. If that blob intersects another blob of roughly the same color, there is no way to tell the two blobs apart. Introduce shadows into the mix and, suddenly, your car disappears into its own shadow, or into the shadow of another car.
On top of that, changes in the camera shot will just result in you losing the car your tracking, every few seconds.
This article[^] is about the best you're going to find.
|
|
|
|
|
thats perfict. this article is exaclty the starting point I was looking for. THANKS!!
I'm listening but I only speak GEEK.
|
|
|
|
|
Hi!
I am trying to build a form that can resize objects(panels).
I am trying to this with cruser change and resize the panel with the mouse with the drag drop events.
I included the enter event but the point that I get from
System.Windows.Forms.Cursor.Position
is not changing no metter where I enter the panel object.
Can someone tell me how can I know in which point my mouse is located on the form and see if it equals to the panel.
another quastions is how I change the curser in the code???
I could not find a good example for this.
Does some one has something or can point me to a good code example??
Thanks
|
|
|
|
|
Hi,
Cursor.Position gives screen coordinates (i.e. relative to the top left edge of the screen).
you can translate them to relative to the top left edge of some control or form by calling Control.PointToClient
Each Control (or Form) has a Cursor property, so change the appearance by myControl.Cursor=Cursors.XXX
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I have tried searching and everything I find says to use "WebRequest.UserAgent" but this isnt a valid option in my solution to add. Am I doing something wrong? The script is pulling content from the webpage 100% correctly, I just want to be able to specify the user agent also.
byte[] data = System.Text.Encoding.ASCII.GetBytes(FormVariables);
System.IO.Stream os = null;
WebRequest request = null;
WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultCredentials;
request = WebRequest.Create(URL);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.ContentLength = data.Length;
request.Timeout = 420000;
os = request.GetRequestStream();
os.Write(data, 0, data.Length);
os.Close();
System.Net.WebResponse resp = null;
resp = request.GetResponse();
System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
strResponse = sr.ReadToEnd().Trim();
|
|
|
|
|
Good Evening,
currently I am doing a small program which copies a file from one folder to another folder. The destination folder is the "Fonts" folder which holds all fonts of my system. Currently my code looks like this:
FileIOPermission f2 = new FileIOPermission(FileIOPermissionAccess.Write, "C:\\Windows\\Fonts\\");
f2.AddPathList(FileIOPermissionAccess.Read , origin);
try
{
System.IO.File.Copy(origin, destination);
}
catch (UnauthorizedAccessException ex)
{
MessageBox.Show(ex.ToString());
}
When I start debugging, the debugger tells me that I dont have permission for C:\Windows\Fonts\"filename". Which confuses me a bit since I thought I already got write permission to "C:\Windows\Fonts\". What am i doing wrong?
P.S.: I am using Windows Vista SP1 64-Bit
Thanks for your help and advices
|
|
|
|
|
Can someone give me some help on this please, since i dont know what i am doing wrong? I used a messagebox to have a quick look at the permmission i requested and it says i asked for write permission for C:\Windows\Fonts and read permission for the folder in "origin".
Is there something else I have to do?
|
|
|
|
|
I have an ASP.NET application that I'm upgrading, and my new development box is Windows Vista and VS.NET 2008. It's well documented that Jet is not installed in Vista, and will not run on it. Does anybody know what the connection string is that I should be using, and what provider needs to be installed? I checked http://www.connectionstrings.com[^], but couldn't quite find what I was looking for. I figure SOMEONE has already been down this road, and thought I'd ask.
Thanks in advance.
|
|
|
|
|
Hi,
I'm using Access on Vista with OLEDB
connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+file+";User Id=XXX;Password=YYY;";
Every constr you ever needed[^] is here.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
That's what I was using when I migrated the project to my new development box, but it says that it can't find the Jet provider. Research on Google says that you can't use Jet in Vista; the installer won't even install it. How did you set it up?
|
|
|
|
|
I don't recall there being any issue.
I installed Access2003, Visual Studio, and lots of other stuff on a Vista Home Premium machine.
Then created a C# app that works on an existing mdb file.
What installer is complaining? and what is its message?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I don't kown why..., but when I adding attachment (Bitmap) from MemoryStream, it dosn't work, because I receive mail with picture, but it has 0 KB. Bitmap adding as attachment from FileStream, work correctly... (sorry, my bad english)
thanks
Here is my snippet code:
...
Bitmap bmp;
...
MemoryStream = new MemoryStream();
bmp.Save(memStream, ImageFormat.Jpeg);
...
ContentType contentType = new ContentType();
contentType.MediaType = MediaTypeNames.Image.Jpeg;
contentType.Name = "screen";
MailMessage mail = new MailMessage();
...
mail.Attachments.Add(new Attachment(memStream, contentType));
...
SmtpClient.Send(mail);
|
|
|
|
|
I don't see where you are even getting the bitmap?
Bitmap bmp; <---- Empty
MemoryStream memStream = new MemoryStream(); <--- Empty
bmp.Save(memStream, ImageFormat.Jpeg); <---- Still Empty
Where are you actually getting the bitmap data from? As far as I can see that is why it is 0kb because you are not giving it any data
|
|
|
|
|
shouldn't you "rewind" the stream?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
In memory buffer, there is a snap shott from screen.
This code is not completly, if i try save image from memory buffer to file.. it's ok
|
|
|
|
|
did you try memStream.Position=0; // rewind ?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
now I try it, but nothing
MemoryStream memStream = new MemoryStream();
memStream.Position = 0;
bmp.Save(memStream, ImageFormat.Jpeg);
|
|
|
|
|
Have a cup of coffee, then do the rewind after saving the image.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
omg.. very very thanks..
|
|
|
|
|
Thank you! Was having the same problem.
|
|
|
|
|
This might be a simple answer but I cannot seem to think of it. What would be the best way to send reports every monday at 7am. I guess what I am asking what is the best way to determine the time is 7am and send the report?
Run a timer every second and if the day is Monday and the time is exactly 7:00am send it? Or is there a better way I am just not thinking of?
|
|
|
|
|
Create a console executable and schedule it using windows task scheduler. You can also go for a scheduled windows service but there are opinions that "services are not meant to be scheduled".
जय हिंद
|
|
|
|
|
I forgot to mention that this was going to be a Windows Service
|
|
|
|
|
then use a timer; however don't rely on exact timing, you might miss a start if the system happens to be busy.
Instead use a time window, and check the current date is different from the date it ran last.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Make sure you handle the case where the machine may be rebooted or your service restarted, even during the reporting time window.
|
|
|
|