Warning: session_start(): open(/var/lib/php/sessions/sess_g1eddj0dbe8i3h845aqbnll68u, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
get("#481") -- haikurecognize
result = otherresults["#422"] or error("Need result of #422, please recalc")
tbl = {}
j = nil
while true do
i, j, x1, y1, x2, y2 = string.find(result, "(%d+),%s*(%d+),%s*(%d+),%s*(%d+)", j)
if i == nil then break end
x1, y1, x2, y2 = tonumber(x1), tonumber(y1), tonumber(x2), tonumber(y2)
local cropped = {width=x2-x1, height=y2-y1,
getInt = function(x, y) return img.getInt(x+x1, y+y1) end}
local crop = string.sub(result, i, j)
local s = haikurecognize(cropped)
if s ~= "" then
table.insert(tbl, crop..": "..s)
end
end
return table.concat(tbl, "\n")