Say I have several images taken from a car dashcam where I have boundary box around the car with corners A (x1,y1), B (x2,y1) ,C (x2, y2) ,D (x1, y2) and a boundary box around it’s associated number plate with corners E (a1,b1),F (a2, b1),G (a2, b2) ,H (a1, b2). How can I derive a relationship between the two boxes?

The license plate boundary box moves within the boundary box of the car because of the angle of view of the camera and the position of the vehicle in frame. For example, cars directly in front have a license plate position that is mostly central whereas a car on the right has a license plate boundary box to the right, within the car boundary box.

The image below should help to show this.


I intend to train a machine learning model with several hundred images but I need just need to get the ball rolling with the mathematical concept? Is it some form of regression?

I have the co-ordinates of each corner in (x,y)pixels. How do I derive a relationship between the two?

I also have image width (W) of 720 pixels and image height( H) of 1080. I suppose the independent variables are A,B,C,D and dependant variables E,F,G,H.

I believe I would have 4 functions for each independent variable?

Thanks in advance!


1 Answer 1


The location of the license plate bbox relative to the car bbox depends on many factors such as the car's rotation and translation relative to the dashcam, the shape of the car (since this governs the car bbox), as well as the size and position of the license plate on the car and the intrinsics of the dashcam.

In theory, if you knew all these quantities exactly, you could perfectly compute the bbox of the license plate. In practice, you probably can't get all of these quantities, so this isn't a great approach.

A practical approach to solving this problem is to train an object detector to locate license plates, and then come up with a matching heuristic to match license bboxes to car bboxes (you can imagine many tricky cases where the number of cars and the number of license plates is different).

  • $\begingroup$ Hi Shimao, thank you for your reply. Do you know, mathematically, what direction I should take if I were to use machine learning taking a heuristic approach? I would settle for an estimate, even computing a plate bbox that is larger than the plate to perform optical character recogniton. $\endgroup$
    – Lumber911
    Jun 12 at 18:38
  • $\begingroup$ I suppose I wouldn't want to apply this machine learning algorithm to general cases but use for one dataset i.e. frames from the same video with same camera position. This would reduce complexity I imagine? $\endgroup$
    – Lumber911
    Jun 12 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.