Would like to calculate distance of a image using VB, anyone can help me to start off as i have struggle for quite some time!
thanks..
8 1516
Would like to calculate distance of a image using VB, anyone can help me to start off as i have struggle for quite some time!
What do you mean, precisely, by "distance of an image"? And what version of VB are you using?
If you mean the distance between two points on an image, it's usually quite simple. You calculate the horizontal distance (difference between the two X coordinates) and the vertical distance (difference between Y coordinates) then use Pythagorus' theorem (you know, the old "hypotenuse" thing" to calculate the straight-line distance.
You've got me interested now. I think I'll write a little sample function to do this, and post it in the VB Articles area. This will be written in VB6, but should work in any version.
Ok, here is a link to the article.
Ok, here is a link to the article.
Hi Killer ,Thanks for your help.
FYI, i am using VB6.
As i am still very green in this area, i am actually don't know where to start.
Question.
1) where should i load the picture?? is the picturebox or image in VB able to perform this ?
2) how am i going to determine the coordinate??
Thanks..
I think you need to give us a bit more detail on what you are trying to achieve.
I think you need to give us a bit more detail on what you are trying to achieve.
Generally, i have an image which i need to determine the changes of x and y.
I need to import the image to a "place", which i don't know whether picturebox or imagebox can do the job? can the image or picturebox tell the coordinate??
thanks..
Generally, i have an image which i need to determine the changes of x and y.
I need to import the image to a "place", which i don't know whether picturebox or imagebox can do the job? can the image or picturebox tell the coordinate??
I still don't understand the question. What coordinate? If you mean the coordinate where you loaded the image, it doesn't need to tell you. You just told it, so you must already have that information.
Hang on... when you say the "distance" of an image, you don't mean the size of the image, do you?
I still don't understand the question. What coordinate? If you mean the coordinate where you loaded the image, it doesn't need to tell you. You just told it, so you must already have that information.
Hang on... when you say the "distance" of an image, you don't mean the size of the image, do you?
The process is to determine the offset distance of the objects.
let's assume that i have loaded the picture in the picture box.The first image that i loaded in x1=90, y1=100. next i will load in the second image which x2=200,y2=-200. how am i going to determine the offset distance between the two image?
Oh, well that's easy - see post #2.
Calculate the difference in X values, the difference in Y values, then use whatie's theorem to get the actual distance. Anyone who has ever done geometry has to know the old "A squared plus B squared" thing.
Also, post #3 links to a function which will give you the answer.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Deepa |
last post by:
Hi All,
I'm facing problem displaying image of size 5000X5000 .My window size
is smaller than image size so i'm not able to see the complete image.i
can use scroll bars to view the image but i...
|
by: jasonshohet |
last post by:
I read recently that: "if a before-image was made before an
interruption in database processing, you use the before-image dump &
simply begin processing again from just before the last...
|
by: Jigar Mehta |
last post by:
Hye Friends!!,
Happy New Year!!
I am Jigar Mehta from India. Currently I am working on a project in
which I need to compress some images on the harddisk... I want to make an
engine that reads...
|
by: |
last post by:
Hi,
we are planning to rewrite an extisting C++ image processing
application/library in C#. Now several question arouse where I hope you can
help me:
So far we allocated a block of memory as...
|
by: stonny |
last post by:
Hi, I am converting my matlab program into C/C++. I need to change some
image processing toolbox functions into C/C++, such as edge detection,
mathematical morphology.
Is there any place that I...
|
by: Enrique Cruiz |
last post by:
Hello all,
I am currently implementing a fairly simple algorithm. It scans a
grayscale image, and computes a pixel's new value as a function of its
original value. Two passes are made, first...
|
by: birensubudhi |
last post by:
hey guys,can anyone tell me what is image processing,
how to do it using C.
IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked,
they hav given an image then cut in different orientation...
|
by: Peter Oliphant |
last post by:
The Image class allows loading a bitmap from a graphic file. So far I've
gotten it to work with JPG and BMP files.
What other graphic file formats are supported in this way? Is this fixed
based...
|
by: whisk3rs |
last post by:
Hello, I have a conceptual question. I need to write a program that
will take as input a list of images and then process each image
individually (extract useful features from the image)
...
|
by: tavares |
last post by:
(Our apologies for cross-posting.
We appreciate if you kindly distribute this information by your co-
workers and colleagues.)
...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |