'commit'
This commit is contained in:
@@ -399,6 +399,12 @@ def crop_cards_from_image(img_path, output_dir=None, save_debug=True):
|
||||
json_data["cards"].append({
|
||||
"id": idx + 1,
|
||||
"rect": [int(x1), int(y1), int(x2), int(y2)],
|
||||
"bounds_norm": {
|
||||
"left": round(float(x1) / w, 4),
|
||||
"top": round(float(y1) / h, 4),
|
||||
"right": round(float(x2) / w, 4),
|
||||
"bottom": round(float(y2) / h, 4)
|
||||
},
|
||||
"click_point": [int(click_x), int(click_y)]
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user