将检测任务迁移python
This commit is contained in:
@@ -11,11 +11,11 @@ public final class Overlay {
|
||||
|
||||
public static void draw(List<Detection> dets, Mat frame) {
|
||||
for (Detection d : dets) {
|
||||
Rect r = d.box();
|
||||
int bgr = d.colorBGR();
|
||||
Rect r = d.getRect();
|
||||
int bgr = d.getColorBGR();
|
||||
Scalar c = new Scalar(bgr & 0xFF, (bgr >> 8) & 0xFF, (bgr >> 16) & 0xFF, 0);
|
||||
rectangle(frame, r, c, 2, LINE_8, 0);
|
||||
String label = d.cls()+" "+String.format("%.2f", d.conf());
|
||||
String label = d.getLabel()+" "+String.format("%.2f", d.getConfidence());
|
||||
int[] baseline = new int[1];
|
||||
Size t = getTextSize(label, FONT_HERSHEY_SIMPLEX, 0.5, 1, baseline);
|
||||
int x = Math.max(0, r.x());
|
||||
|
||||
Reference in New Issue
Block a user