e4dcfc49aa
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
80 lines
1.8 KiB
Python
80 lines
1.8 KiB
Python
"""Vision tools for image processing and GeoGebra support."""
|
|
|
|
from deeptutor.tools.vision.block_parser import (
|
|
BlockType,
|
|
GGBBlock,
|
|
ParsedContent,
|
|
StreamingBlockParser,
|
|
parse_ggb_blocks,
|
|
)
|
|
from deeptutor.tools.vision.coord_transform import (
|
|
DEFAULT_GGB_COORD,
|
|
GGBCoordSystem,
|
|
ImageDimensions,
|
|
Point,
|
|
bbox_to_ggb,
|
|
calculate_distance,
|
|
calculate_midpoint,
|
|
convert_bbox_elements_to_ggb,
|
|
format_ggb_point,
|
|
format_set_coord_system,
|
|
ggb_to_bbox,
|
|
is_parallel,
|
|
is_perpendicular,
|
|
suggest_coord_system,
|
|
validate_point_in_bounds,
|
|
)
|
|
from deeptutor.tools.vision.ggb_validator import (
|
|
ValidationResult,
|
|
get_command_help,
|
|
validate_command,
|
|
validate_ggbscript,
|
|
)
|
|
from deeptutor.tools.vision.image_utils import (
|
|
ImageError,
|
|
fetch_image_from_url,
|
|
image_bytes_to_base64,
|
|
is_base64_image,
|
|
is_valid_image_url,
|
|
resolve_image_input,
|
|
url_to_base64,
|
|
)
|
|
|
|
__all__ = [
|
|
# Image utils
|
|
"ImageError",
|
|
"fetch_image_from_url",
|
|
"image_bytes_to_base64",
|
|
"is_base64_image",
|
|
"is_valid_image_url",
|
|
"resolve_image_input",
|
|
"url_to_base64",
|
|
# Coord transform
|
|
"DEFAULT_GGB_COORD",
|
|
"GGBCoordSystem",
|
|
"ImageDimensions",
|
|
"Point",
|
|
"bbox_to_ggb",
|
|
"calculate_distance",
|
|
"calculate_midpoint",
|
|
"convert_bbox_elements_to_ggb",
|
|
"format_ggb_point",
|
|
"format_set_coord_system",
|
|
"ggb_to_bbox",
|
|
"is_parallel",
|
|
"is_perpendicular",
|
|
"suggest_coord_system",
|
|
"validate_point_in_bounds",
|
|
# GGB validator
|
|
"ValidationResult",
|
|
"get_command_help",
|
|
"validate_command",
|
|
"validate_ggbscript",
|
|
# Block parser
|
|
"BlockType",
|
|
"GGBBlock",
|
|
"ParsedContent",
|
|
"StreamingBlockParser",
|
|
"parse_ggb_blocks",
|
|
]
|