Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, January 25, 2007 1:13:12 AM(UTC)

Teresa  
Teresa

Groups: Registered
Posts: 7


Dear all,

Is it possible to misure the area of a region choosen by the user on the freehand (VB6)?

I am trying on the onAnnDrawn  event calling the getarea method, but his gives me the number of pixels that make nosense when I translate them to other misurements

Is it correct what i am trying to do, is there any other way to do it?

Private Sub RasterAnn_OnAnnDrawn(ByVal hAnnObject As Long)

   If etiqueta = ANNTOOL_FREEHAND Then MsgBox "Area:" & RasterAnn.AnnGetArea(hAnnObject)
  End Sub

Thanks so much in advance

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, January 26, 2007 2:24:57 AM(UTC)

Teresa  
Teresa

Groups: Registered
Posts: 7


Hi, its me again, I think my question is not clear, once I get the area, the number of pixels, do I have to calculate the resolution and divide it by the resolution?, can you give me an example of how to calculate the area in Cm once I have the number of pixel

Thanks so much

 
#3 Posted : Sunday, January 28, 2007 5:12:48 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

You can use the following approach to calculate the area in CM:

1-Total area in pixels (Dots) = (Dot *Dot) =Dot ².
2-Resolution is measured in Dot/Inch.
3-Dot²/(XResolution *YResolution) =Inch²
4-Inch² *(2.54 CM/Inch)² =CM²

So, Area in CM² = (Area in Pixel²)/(XResolution *YResolution) * (2.54)²

 
#4 Posted : Sunday, January 28, 2007 11:19:49 PM(UTC)

Teresa  
Teresa

Groups: Registered
Posts: 7


Thank you very much for your quick response!!!, I will use your formula

Thanks again

Teresa

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.063 seconds.