From 890836293dbf04c06b1b7062d79a52232bc4dd55 Mon Sep 17 00:00:00 2001 From: TylerP33 Date: Sat, 10 Feb 2024 18:21:20 -0600 Subject: [PATCH] cleaned up coord highlight and centered containers via flexbox --- server.js | 6 ++ views/Upload.html | 224 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 163 insertions(+), 67 deletions(-) diff --git a/server.js b/server.js index 4be6b15..80d68cb 100644 --- a/server.js +++ b/server.js @@ -61,6 +61,11 @@ app.get("/takeScreenshot", async function(req, res){ }); app.get("/getValueFromImage", async function(req, res){ + /* + Sometimes grabs some random characters that are not on the screen. This is especially obvious + when grabing the price off of LiquidationDelivered.com. The rectangle has to be pretty tight on the price + in order to avoid grabbing random characters. Need to investigate because that could be a huge issue. + */ console.log("Pulling info from image"); let name = req.query["name"]; let top = req.query["top"]; //374 @@ -80,6 +85,7 @@ app.get("/getValueFromImage", async function(req, res){ } = await worker.recognize(img, { rectangle } ); + console.log(text) console.log("Found Price!"); res.send(text); res.end(); diff --git a/views/Upload.html b/views/Upload.html index 667dee9..0b5e447 100644 --- a/views/Upload.html +++ b/views/Upload.html @@ -1,84 +1,174 @@ + - - - - - + + Image Selection + + + + +
- URL: - Name: - + + + + +
-
- Top: - Left: - Height: - Width: -
- -
- -
- -
+
+

+
+
+ +
+
+ - \ No newline at end of file + +