Jump to content
Sign in to follow this  

How to use this function in VB.NET?

Recommended Posts



I'm using an SDK which allows me to retrieve numberplates from cars from a video file. One of the functions lets me define an area as a rectangle which will be analysed so that i don't have to analyse parts of the video where a number will never show up.


Here is how it was described in the programmers reference:

Public Sub SetScanRectangle( _
   ByVal left As Long, _
   ByVal top As Long, _
   ByVal right As Long, _
   ByVal bottom As Long _


The coordinate of the left border of the rectangle


The coordinate of the top border of the rectangle


The coordinate of the right border of the rectangle


The coordinate of the bottom border of the rectangle



I've implemented it like this:

_engine.SetScanRectangle(0, 0, 0, 0)

Now i must be a complete idiot in thinking that defineing a rectangle will require 4 co-ordinates i.e 2,13 for top left 65,13 for top right, 2,35 for bottom left and 65,13 for bottom right - for example.


How do you define a rectangle with single integers?.


This will greatly improve the software, so if anyone can shed some light on this function i will be extremely greatful!




Thanks folks :).

Edited by smakme7757

Share this post

Link to post
Share on other sites

Sounds like 'top' and 'bottom' are y-co-ordinates, and 'left' and 'right' are x-co-ordinates. They map the sides of the rectangle rather than the vertices. It'd look something like this:



I'd say you're correct. Now it would be interesting to know what units they are using. I guess it's pixels??


I'll just have a play i guess.


Thanks again for the reply - I got that Wolfram app on my Desire Z btw, pretty handy.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this