Menu

A finger draws a box over a live camera preview, and 194 lines of arithmetic decide which pixels that means
📰

A finger draws a box over a live camera preview, and 194 lines of arithmetic decide which pixels that means

DEV Community: reactnative·Daniel Pertu·14 days ago
#S1bmaM8Q
#devtoreactnative#devto#dev#view#drag
Reading 0:00
15s threshold

Munchable scans barcodes, but a restaurant menu has no barcode. So the app has a second camera mode: point it at the menu, drag a box around a dish, let go. There is no shutter button. You can watch it in the third panel under How it works on munchable.app , where the demo drags a box around "Creamy garlic mushroom tagliatelle" the way a thumb would.

The interesting part is not the gesture. It is that a box drawn in view points has to become a rectangle in photo pixels, and every way of getting that slightly wrong fails quietly : the crop lands somewhere plausible, misses the last two lines of the dish description, and the user is told we could not read that. There is no broken screen to look at.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.