MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / resize_lane

Method resize_lane

eval/LANE_evaluation/lane2d/src/lane_compare.cpp:77–89  ·  view source on GitHub ↗

resize the lane from Size(curr_width, curr_height) to Size(im_width, im_height)

Source from the content-addressed store, hash-verified

75
76// resize the lane from Size(curr_width, curr_height) to Size(im_width, im_height)
77void LaneCompare::resize_lane(vector<Point2f> &curr_lane, int curr_width, int curr_height)
78{
79 if(curr_width == im_width && curr_height == im_height)
80 {
81 return;
82 }
83 double x_scale = im_width/(double)curr_width;
84 double y_scale = im_height/(double)curr_height;
85 for(int n=0; n<curr_lane.size(); n++)
86 {
87 curr_lane[n] = Point2f(curr_lane[n].x*x_scale, curr_lane[n].y*y_scale);
88 }
89}
90

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected