MCPcopy
hub / github.com/IPADS-SAI/MobiAgent / recognize_image

Method recognize_image

utils/advanced_ocr.py:274–287  ·  view source on GitHub ↗

识别图像并返回处理后的文本结果 Args: image_path: 图像文件路径 Returns: ProcessedText: 处理后的文本结果,失败时返回None

(self, image_path: str)

Source from the content-addressed store, hash-verified

272 return primary_text, secondary_text
273
274 def recognize_image(self, image_path: str) -> Optional[ProcessedText]:
275 """
276 识别图像并返回处理后的文本结果
277
278 Args:
279 image_path: 图像文件路径
280
281 Returns:
282 ProcessedText: 处理后的文本结果,失败时返回None
283 """
284 text, _ = self.extract_text_from_image(image_path)
285 if text:
286 return self.process_text(text)
287 return None
288
289 def get_word_list(self, image_path: str) -> List[str]:
290 """

Callers

nothing calls this directly

Calls 2

process_textMethod · 0.95

Tested by

no test coverage detected