OCR Node
The OCR node looks for image files in the msg.payload
.
If an image is found, it performs
optical character recognition (OCR) on that image to greedily extract any words present.
Extracted words are added to msg.payload
.
Configuration
Input
Note, if the
twitter sensor
node
was used in the flow this node will automatically perform analyses on all shared images.
Output
Extracted words are added to the msg.payload
.
Furthermore, the message will be enriched by the ocr
property.
Example message
{
"payload": "DOGE . Crypto\nDogecoin\nS0.064354\n+S0.00387 (6.4%) Today",
"confidence": 0.7954844350801857,
"ocr": [
{
"url": "https://pbs.twimg.com/media/FePUcQ6VUAAur32?format=jpg&name=small",
"text": "DOGE . Crypto\nDogecoin\nS0.064354\n+S0.00387 (6.4%) Today",
"bounds": [
[
[
[88, 12],
[260, 12],
[260, 44],
[88, 44]
],
"DOGE . Crypto",
0.9091783424046121
],
[
[
[26, 68],
[210, 68],
[210, 120],
[26, 120]
],
"Dogecoin",
0.8252040240556264
],
[
[
[26, 120],
[246, 120],
[246, 168],
[26, 168]
],
"S0.064354",
0.5889591676256629
],
[
[
[26, 170],
[220, 170],
[220, 196],
[26, 196]
],
"+S0.00387 (6.4%) Today",
0.8585962062348412
]
],
"rendered_img": "data:image/JPEG;charset=utf-8;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAIAAYkDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDw2iiiukYUVLa2txfXcVrawvNcTMEjjQZZmPQAVt+K/DcPhe4tbB9RjudT8vdfQxDKWz9k3fxHHX0NK4HP0UUUwCiiigAorpdCsBq2u6JoyC3iF8URpngDlSSeffpW2nh3StU..."
}
]
}
Last updated on
Oct 8, 2022