qwertylol Posted May 24, 2007 Posted May 24, 2007 I am working on my OCR script. my method currently employed the baseline concept, the first point is input and then it counts a few pixels up. this will get the string. expandcollapse popupFunc ocr_string( $first_point, $width_to_check) Local $string Local $x_offset = 0 Local $y_offset = 0 Local $box = 0 Do Do ;MouseMove ( ($first_point[0] + $x_offset) , ($first_point[1] + $y_offset ) ) $color_ocr_sample = PixelGetColor ( ($first_point[0] + $x_offset) , ($first_point[1] + $y_offset ) ) $red = _ColorGetRed($color_ocr_sample) $green = _ColorGetGreen($color_ocr_sample) $blue = _ColorGetBlue($color_ocr_sample) If $green > $red AND $green > $blue Then $box = $box + 1 EndIf $y_offset = $y_offset - 1 Until $y_offset = -10 $y_offset = 0 $string = $string & $box $x_offset = $x_offset + 1 $box = 0 Until $x_offset = $width_to_check Return $string EndFuncoÝ÷ ٩ݶ§¶¬Â)e¶¼¢fray×xÚºÚ"µÍ[ÈÚXÚ×ÙY[][Û ÌÍÜÝ[È BBNÒY ÌÍÜÝ[ÈOH ][ÝÌLLLI][ÝÂU[NÂT] ][ÝËI][ÝÂNÂQ[YNÓÙÐÞ ][ÝÙYHHÝ[ÈÉ][ÝË ÌÍÜÝ[È BBRY ÌÍÜÝ[ÈOH ][ÝÌLLLI][ÝÂU[BT] ][ÝËI][ÝÂQ[YBRY ÌÍÜÝ[ÈOH ][ÝÍN I][ÝÂU[BT] ][ÝÌ ][ÝÂQ[YRY ÌÍÜÝ[ÈOH ][ÝÌI][ÝÂU[BT] ][ÝÌI][ÝÂBQ[YRY ÌÍÜÝ[ÈOH ][ÝÌÍM LÉ][ÝÂU[BT] ][ÝÌ][ÝÂQ[YRY ÌÍÜÝ[ÈOH ][ÝÌÌÎ I][ÝÂU[BT] ][ÝÌÉ][ÝÂBQ[YRY ÌÍÜÝ[ÈOH ][ÝÌÎI][ÝÂU[BT] ][ÝÍ ][ÝÂQ[YRY ÌÍÜÝ[ÈOH ][ÝÌMLÍ ][ÝÂU[BT] ][ÝÍI][ÝÂBQ[YRY ÌÍÜÝ[ÈOH ][ÝÍMÍÍÉ][ÝÂU[BT] ][ÝÍ][ÝÂQ[YRY ÌÍÜÝ[ÈOH ][ÝÌLÍMM][ÝÂU[BT] ][ÝÍÉ][ÝÂBQ[YRY ÌÍÜÝ[ÈOH ][ÝÍNÌÎ I][ÝÂU[BT] ][ÝÎ ][ÝÂQ[YRY ÌÍÜÝ[ÈOH ][ÝÌÍÍ ÍI][ÝÂU[BT] ][ÝÎI][ÝÂBQ[Y[[ now though, to take it a step further, I need to recognize graphics that may be upside down, or left to right. the arrow: > might look like this ^ and it might rotate all over the place, how do we recognize it anyway?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now