fix: update OCR result coordinates to center position
This commit is contained in:
		@@ -44,10 +44,8 @@ def perform_ocr(screenshot: bytes) -> list[dict]:
 | 
				
			|||||||
        if text and text.strip():
 | 
					        if text and text.strip():
 | 
				
			||||||
            results.append({
 | 
					            results.append({
 | 
				
			||||||
                'text': text,
 | 
					                'text': text,
 | 
				
			||||||
                'left': data['left'][i],
 | 
					                'x': data['width'][i] + data['left'][i] // 2,  # center x position
 | 
				
			||||||
                'top': data['top'][i],
 | 
					                'y': data['height'][i] + data['top'][i] // 2  # center y position
 | 
				
			||||||
                'width': data['width'][i],
 | 
					 | 
				
			||||||
                'height': data['height'][i]
 | 
					 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
    return results
 | 
					    return results
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user