I have a problem in detection edges in a picture. Im going to use this to make some recognition of pictures. I have found a way of doing Sobel filtering without the use of system.drawing.bitmat with BitmapSource.CopyPixels. I have posted code fore Sobel filtering here:
I have a function to do edge detection that works fairly good with one pass and without using a convolution filter. The only thing is that it will shift by one pixel the resulting image when I runt it from top to bottom and from left to right. I can live with that. Just a curious thing that I got when I ran it several times in a loop to see the effect of applying it several times on the resulting image.A deformed image appears at the beggining and then, bit by bit it splits appart and after shifting it the width of the original image I get a double image. I wonder how the computer keeps track of the first image and is able to separate the two after several iteractions.I know that in electronics you can have several signals in a circuit and you can separate them with frequency filters, or you can simultaneously download several files with the same modem aand the two computers will synchronize each one, but this surprissed me.
Here is a simplified version of my function
Private Function Preview(ByVal Thumb As Image) As Image Dim bm As New Bitmap(Thumb) Dim X As Integer Dim Y As Integer
[code]....
I have tried with more complicated images and with larger sizes, but to make upload smaller I includes these two images of simpler and smaller size. A view of the GUI and an animation of the process:reload to see the animation.
I need to read 10 images in 1 folder and do feature extraction onto 10 images.Does anyone can suggest any good edge detection by using C++ / VB.Net / C# language? After I can successfully detect the edge and write a new image file (in this case is generate 10 new edge detection filtered images, only black and white line image) within the same folder.Then lastly, I do not know any distance measurement able to calculate distance between each edge detection filtered-images (not the original image) and show the result in graph.How can read those images back and get the data of the edge?Keywords are edge detection and distance measurement.
I was wondering if there is a way, I can hide the forms edge. By "edge" I meen the blue/gray half-transperrant edge. Like in the spotify login menu, for example. There is no edge.
I'm trying to draw some text using GDI (i.e. using a graphics object). It is done using the basic method of creating a path, adding a string to it and using a brush to fill it.
The only tricky part is that I need to apply a soft edge wipe to it. To describe what I'm trying to do better, I've uploaded an example done in photoshop: [URL]
What is the best way of achieving this? I need to be able to control the mask that is creating the soft edge - i.e. the position of the gradient, the width of the gradient etc.
Ideally I'd like to do it using the graphics object and not dipping into .dlls - but at the end of the day I'll do whatever it takes!!
I am using axMSChart objects to display charts in my VB .Net Windows Forms App.I am also trying to export them to a PowerPoint presentation which I automatically generate using Office Interop.However, when I use EditCopy to copy the Chart to the clipbord and paste it into PowerPoint, the color of the Edge of my Bar Chart is set to red for the firstSeriesCollection and green for the second one.
I've got a usercontrol that's a simple rectangle with three labels on it. It's essentially triggered to give a caption to an image when the mouse is moved over it. As I feared, adding the control to the form (or any container on the form) restricts drawing the control to the region defined by the container. I tried increasing the region of the form and the container, but it still didn't draw outside the container.
So my question is: Is there a way to make the control display partially inside the container/form and partially outside it, or is there a better object type that will do what I want?
I have a picture box. The user can click with in the picture box. Anywhere they click it will draw another Ellipse. The problem is the edges of the picture boxes cut the image of the newly drawn ellipse. Is there a way draw the new ellipse so the user can see the entire thing?
I would like my 'quit' button to appear in the bottom right hand corner of my menu screen, but it seems that every computer in the office has a different sized screen, different size ration (some are widescreen) and different resolution. When I deploy my program, the quit button may appear off-screen (the user has to scroll down to find it) or it may appear half way across the screen on a widescreen laptop for example. If I set my form to 'maximized', is there a way to position a button relative to the bottom right hand corner of the form? Also, on one maximized form I have two datagridview's side by side. Is there are way to automatically set each one to take up half of the available form width, so they fill the form nicely?
I've got a borderless form that I'm handling the MouseDown, MouseMove & MouseUp events to do the dragging and re-sizing which I have working just fine but I started thinking how neat it would be if I could have the borderless windows snap to each other and to the edges of the screen(s), this part I'm stuck on. I've got them snapping together just but and I've got it snapping to the edge of the screen but I have a dual monitor set up at home and I can't move it to my right side secondary screen with the code I have now. I'm attaching a sample VS2010 project with only the relevant code for this.Eventually I might add in the snapping to the desktop edge or to another note window's edge when resizing too, but that's not my focus right now.
I am creating a windows form background image, but when it use to a form it's look very bad in the edge, it don't smooth. Using VB only. I tried use alphablend but how.
I am trying to make a rectangle that can be resized by the userby clicking and dragging the edges/corners of the rectangleTypically, if the mouse enters the rectangle region, then smalladjustment boxes should appear at the corners of the rectangleand also at the middle of the rectangle's edges (to allow the userto drag and resize the rectangle). When the mouse leaves therectangle region, then the adjustment boxes should disappear.I have the code to draw the rectangle and to produce the smalladjustment boxes, but I'm not sure how to accomplish thedrag and resizing steps (or if it's even possible with the way mycode is written).
Code:Imports SystemImports System.DrawingImports System.Windows.Forms Private bBlocking, bValidBox As Boolean Private pt1, pt3 As Point Private rectBox As Rectangle Private cornerRect1 As Rectangle Private cornerRect2 As
I am currently investigating vb gaming and have set up a test project to move an object; it moves fine. The problem is that when it reaches the edge of the form it continues to move and eventually leaves the form entirely. So my question is how do i work out if my object has touched the edge of the form?
Having some issues with creating a simple control in vb.net.
I create a control with a single label in, I don't change anything except the colour of the control and the label and also making the label anchor to the edges ( with a small border around the edge)
When i then build it and add this control to a form. Some of the edges are cut off and it isn't anchored the way it was in the control.[url]...
as you can see in the second image the control has lost its white border at the right and bottom.
This question may be off-topic. If it should be posted in another place (even on another board) For some given curves (see sample below) I have to quantify whether the red dots in some regions of the curve are more dense at the upper or lower edge of the curve. Which algorithm might be adequate to perform this task? The curves are constructed from measurements. (No mathematical formula behind it.) Every data point has two dimensions: A value in the range 4000-7000 and a second value 0-255.
I've already got some code in my software that works for what i'm after, but with a small side-effect. Currently, the USB detection works fine and it also provides me with the drive letter of the newly inserted drive - perfect. However the CD detection also picks up when a memory stick is inserted and if say there was a CD in the drive, it would opt to play the disc instead of look for content on the USB stick. This seems to happen because the USB detection is slower than the CD detection.
I also have code that detects and cancels the autoplay request.
Code: Public Sub New() ' This call is required by the Windows Form Designer. InitializeComponent() 'initialized
I'm developing a webbrowser (how ussual!) named Hyvar.NET which utilizes the PhishTank database That database is updated once an hour and i need my application to download it on first run. DOWNLOADING it isnt the problem - detecting the first run of the day is.My downloader is set up and ready to roll, but im having heaps of trouble getting the program to determine if its the applications first run of the day or not - if it is of course it will download the database, load it and then continue to run as normal.
Edit: I've tried using the System.Environment class - it got me me nowhere (the loader is in the MyBase.Load [frmMain.vb])
I am working on a program to match overlapping images together to make one complete image. This isn't for panoramic purposes, it is from a video game generated overhead map, so there is no perspective issues to deal with and the overlapping images (gained from screenshots while a player moves) should be pixel perfect (still running tests to verify this, but lets assume they are pixel perfect at this time).
1) I need to compare each new (small) overhead map section to the larger map, find what edge it fits on, and copy it over.On other forums I have seen people suggest taking the bitmap apart in the form of an array of colors, or 3 arrays per image for r, g, and b. I am wondering why this is done instead of directly going to the bitmap object and using GetPixel. Is an Array lookup significantly faster? Speed would be an issue with my program, I would like to do this match as fast as possible, and the overall map could become large, even if I keep making new map sections to manually paste together later.So, faster to loop through a graphic with getpixel, or faster to go through 3 two-dimensional arrays with r, g, and b, or faster to go through 1 three-dimensional array with rgb all inside it?
2) The bitmap object that contains the overall map will keep getting larger. What is the best way to resize that bitmap dynamically?I am thinking of just making a new, larger bitmap when I get near an edge, then using getpixel and setpixel to copy over the old bitmap to the new one. Is there a faster way to make a new, larger bitmap object containing the old one with the graphics class? I admit to finding the graphics class somewhat confusing in how methods on it affect the image object that is defined as it's surface...or something. There might be a faster way with graphics and drawimage, but is that really faster than a getpixel/setpixel loop? Finally, if I do store the graphics data in arrays instead of actual bitmap objects, would redimming the array be the best way? If I need more room at the 'beginning' of the array I would have to make a new array and then copy the data over shifted. And this might involve 3 arrays if it is best to use one each for r, g, b.
What is the best way for collision detection? I keep trying but I have failed every time.I want my player to not be able to go through my pictureboxes/obstacles from ALL sides.I have 2 player movement down but now I need collision detection. I am trying to save player2's location with a timer using a variable for the location then check if player2 (picturebox2) intersects with picturebox3. If it does then picturebox2 will go back to the location.
I need help with collision detection in visual basic. I am trying to detect when a picture box hits another picture box. The code I'm using is very simple because I'm very much a beginner.
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If Math.Abs(PictureBox2.Left - PictureBox1.Right) And Math.Abs(PictureBox2.Top - PictureBox1.Bottom) Then MessageBox.Show("You Are Dead") End If End Sub
I am trying to do simple collision detection in VB.NET using picture boxes, I have a fixed picturebox, (colour Green), and a moving picturebox, (colour Red). I can manage the collision detection OK, but how do make the movingpicture box bounce off the fixed picturebox and at the right angle? In the following code the moving picturebox sometimes passes right through the fixed one, but not everytime.
ublic Class Form1 Private RedXSpeed As Single = 5 Private RedYSpeed As Single = 5
Right, after reading a few threads here recently about overriding the ProcessCmdKey to use arrow keys I thought I'd try it and make a Space Invaders like game.
In a nut shell what I want is to be able to shoot and move at the same time. Let me explain a bit further, at the moment I can move fine - by holding down, say the right arrow key, but as soon as I hit the space bar to shoot, while holding down the arrow key, the movement stops. Of course, what I want is to be able to hit the space bar and keep moving.
I have thought of implementing a series of timers started and stopped by the key down and key up events but it sounds like overkill, is there a better way?
Anyway, the code for Protected Override of processcmdkey as it stands is below:
Code: Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean Select Case keyData Case Keys.Right
Let me just start off saying that I'm generally new to all programming so if my coding is painful to read I understand. I am currently working on a project that relies on perfect or near perfect collision detection, and I'm not sure whats wrong but sometimes the object being moved completly passes through the object it is supposed to collide at. Here's my coding relating to collision detection so far:
[Code]...
Also, the object, toon, is set to jump with a timer at an interval of 45. Any input regarding how I could make the overall collsion detection better or if I didnt provide the right section of code let me know.
I am developing my project in VB.net. I want to get information of W7/vistHow can i detect them. My code is working properly with Windows Xp but not with PlateForm ID 6 versions
i have 3 PicBoxes on a form. PicBox1=sprite PicBox2=Block1 PicBox3=Block2 I have figured out sprite movement on key down and have figured out simple collision detection for all 4 sides of Block1. My question(s) are:
is there an ideal way to create a method that can be called to handle the collision for all future PicBox's added instead of writting code independently for each key press and each NewBlock along with all 4 sides of the NewBlocks?If I created 100 PicBoxes as obsticles too create a maze type game for my Sprite to navigate through?