Since I want to recognise a shape in an image, I need to know what color the shape's pixels contain, so I can check each pixel's color to identify whether the pixel belongs to the shape. However, I am not sure about the exact color. Do you know how to change an image to a 2bit black and white image? That shud make that easier rite? Currently, I was only able to change the image to grayscale image and then apply edge detection to it, to get the outline of the shape, since what I want is only the x and y coordinates of the outline. Then, since you said GetPixel don't really return transparent color, what I thought was to get the color of GetPixel(1,1) which usually belongs to the background of the image and get all the x and y coordinates of pixels which do not have the same color as Pixel(1,1). But of course this could not be done if the image consist of more than two colors. Will an image after grayscale conversion and edge detection application contain more than TWO colors? However, if I can convert the image to a 2 bit black n white image, it would be better. Please advise.
szevy_suez
Posts
-
A series of points(coordinates)which form a shape [modified] -
A series of points(coordinates)which form a shape [modified]Can I ask u a question? If the image was converted to grayscale and then canny edge detection was applied to it, does that mean the final image contains only two types of colors?
-
A series of points(coordinates)which form a shape [modified]Yup...that's what I want to do. I need the series of x and y coordinates to drive something like an x-y plotter. What I'm doing now is to get the color of image's pixel(1,1) and use the maketransparent method for this color so that the background will be transparent. I assumed that this will result in the onli pixels which are not transparent are the outline of the shape since I had applied canny edge detection to the image. Then, I will check each pixel, if pixel(x,y) is NOT transparent(which is supposed to be the shape) then the x and y values will be stored. But somehow, even pixel(1,1) is not transparent when I test the code. Did I made mistake somewhere? This is my code : Dim x As Integer Dim y As Integer Dim pic as Bitmap=Image.FromFile("C:\Program Files\Inkscape\staredge.bmp") Dim xmax As Integer=pic.Width-1 Dim ymax As Integer=pic.Height-1 try pic.MakeTransparent(pic.GetPixel(1, 1)) Catch MsgBox("failed") end try Do While x <= xmax y = 0 Do While y <= ymax Dim c As System.Drawing.Color = pic.GetPixel(x, y) If c = System.Drawing.Color.Transparent Then wait2send("Untitled - Notepad", "none{ENTER}", 0) Else wait2send("Untitled - Notepad", "yes{ENTER}",0) End If y += 1 Loop x += 1 Loop I used the try and catch method to test whether the maketransparent method worked. The MsgBox("failed") did not appear, so it should worked. But I couldn't figure out what is the problem. Can you please advise?
-
A series of points(coordinates)which form a shape [modified]Hi, How do I get the coordinates of a series of points which form a shape in an image? Is there a way to do this? What image format will be easier for this task? By the way, I need to do this in vb.net. Hope someone can help. -- modified at 8:55 Monday 7th August, 2006
-
Determine the pixel location of specific dotsAnyone know how we can access the pixel value and compare whether it is black (let's say I want to know what is the series of pixel location which forms a star outline, and usually outline are black, pls correct me if Im wrong) and store the pixel column and row value in an array? How to do this? Please help.Thanks.
-
What is an XML editor?I am wondering what is an xml editor and if an application provide that, what can you do with it?
-
Progress bar for application loadingDave Kreskowiak wrote:
If you talking about the application initializing itself, then yes you can. All you have to do update the ProgressBar in your applications initialization code.
Sorry, but I don't really understand what you mean by application initializing itself. Actually, I just want my application to know when the other application has loaded, so I can make that application the active application at that instance and use sendkeys method. So I thought can set a condition if the progressbar is 100% then I can proceed with Appactive and sendkeys methods. I don't know whether it's appropriate, please advice. Thanks
-
Progress bar for application loadingActually, I just need an indication that the application has loaded. If this is the case, is there any way to do it?
-
Terminate another application from vb.net applicationHI, Is there a way to close/terminate another application (for example paint.exe) from my vb.net application? Thanks
-
Progress bar for application loadingHI, Is there way to have the progress bar works according the loading percentage of another application opened from my application? Thanks.
-
Load svg image into pictureboxCan I load svg image into the picturebox in vb.net application? And how do I load the image from a certain location? Could someone show me the code? Thanks
-
Access an image in an image processing softwareHi, I'm sorry, but I am not sure what is an API, I tried google for it, and had a slight idea what is that, but I still dunno how to check the program's API. The program I wish to access is a software built under GNOME desktop environment. Does that help in what I intend to do?
-
Active WindowHi, Is there a way to make a certain application as the active window at certain instance? For example, I want to make another application(such as print etc) as the active window while my application(vb project) is running. Also, is there a way to return the focus to my application for example by a click of certain keystrokes or button? I'm not sure what it is called, but its like controlling the input focus so that it belongs to different application at different instance. I hope you understand what I mean.
-
Access an image in an image processing softwareThen is there a way to make the 'another program' to save as default in a location where my application loads from? Can you give me an example of the file which my application loads from?
-
open a program in a vb project interfaceErm, it's like defining a border/frame in the interface where the program called will be opened sitted in the border/frame
-
Access an image in an image processing softwareHi, Is there a way we can access/extract the image information from an image processing software so that we can modify the image in our vb.net project, for example apply edge detection etc?
-
open a program in a vb project interfaceHi, Some friends here oredi taught me how to open a program from a vb project. But is it possible to make the opened program located in a box in the vb project interface?
-
Open another program/software [modified]Thanks
-
Open a program with a function initiatedThanks
-
Open a program with a function initiatedHi, Thx a lot. Another question. If I want to open the program with a function initiated automatically, is that possible? For example, if start button is clicked, then paint is opened with the save command initiated.