# Flow needed for image recognition

**URL:** <https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789>\
**Category:** General\
**Created:** [27 November 2025 20:18 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789 "2025-11-27T20:18:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [27 November 2025 20:18 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/1 "2025-11-27T20:18:37Z")

</div>

Ok - what I want is a flow that can look at the image from my Centauri Carbon webcam and determine if there is a previous print still sittng on the bed.

In my mind, this would seem to be a useful job for an Awful Idiot piece of image recognition software.

I view whats going on via an IP address  
[http://192.168.0.184/network-device-manager/network/control](http://192.168.0.184/network-device-manager/network/control)

and this what it shows when nothing is lying on the bed

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/f/ff037a8c818e56eeb10f527898d67fcf74671a7e.jpeg)

so in my mind, all it has to do is detect a small (configurable) difference from this image  
e.g

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9d92a0f9842b0e90bcf9a122603d3259a9b10381.jpeg)

I am printing in black ASA at moment so I think this is the most challenging scenario

The reason for this request is that twice (today) I've started printing before removing the previous print 🙂

Printer is in another room.

So I think I need control the equivalent of a studio red light above my monitor to let me know not to press "print" without getting off my backside and going thru to where the printer is

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 November 2025 06:58 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/2 "2025-11-28T06:58:10Z")

</div>

Why would you print something and not remove it from the bed once finished...?  
Why wouldn't you walk to the other room and get it.

Anyway, you can feed this to an AI and ask if there is something on the bed or not.  
You can use pollinations for free, [example](https://github.com/pollinations/pollinations/blob/main/APIDOCS.md#vision--multimodal) for image recognition, pass the image in a post request as base64.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [28 November 2025 08:05 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/3 "2025-11-28T08:05:03Z")

</div>

As Bambu already has this feature, the best flow recommendation would be to buy a Bambu.

---

<div class="post-metadata">

**Author:** ![sumitshinde-84](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sumitshinde-84/32/83795_2.png) [@sumitshinde-84](https://discourse.nodered.org/u/sumitshinde-84)\
**Post date:** [28 November 2025 08:13 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/4 "2025-11-28T08:13:16Z")

</div>

Perhaps you could use [Teachable Machine](https://teachablemachine.withgoogle.com) for this? watch this : [https://youtu.be/-kBCq-M3gSA?si=DvZk3sfspl5hJnKW](https://youtu.be/-kBCq-M3gSA?si=DvZk3sfspl5hJnKW)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 November 2025 09:09 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/5 "2025-11-28T09:09:00Z")

</div>

> [@bakman2](#):
>
> Why would you print something and not remove it from the bed once finished...?

Because it may take 3 hours to print. One does not sit around waiting for it to finish. I suspect that anyone with a 3D printer will have done this at least once.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 November 2025 09:17 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/6 "2025-11-28T09:17:34Z")

</div>

But very few of us have done it twice in the same day 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 November 2025 09:25 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/7 "2025-11-28T09:25:59Z")

</div>

True. I think I have done it only once.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 November 2025 09:35 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/8 "2025-11-28T09:35:54Z")

</div>

I'm failing at the 1st hurdle - using puppeteer to try and get a screenshot of the webpage is crashing NR

Never had a lot of success with pupetteer in NR. I think the last time I did this I had to use an exec node and use puppeteer natively

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 November 2025 13:19 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/9 "2025-11-28T13:19:50Z")

</div>

Are you running headless? Then you may need to provide the arguments for a headless browser, i have a working flow somewhere, can provide it later.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 November 2025 18:24 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/12 "2025-11-28T18:24:54Z")

</div>

Using a function node, in setup tab; add puppeteer, assumes you have installed chromium

```auto
const browser = await puppeteer.launch({
    headless: true, 
    executablePath: '/usr/bin/chromium', 
});

const url = "http://192.168.0.184/network-device-manager/network/control"

// Open browser and navigate to page
node.status({ fill: "yellow", shape: "ring", text: "starting browser" });
const page = await browser.newPage();

// you may need to set the proper browser size
await page.setViewport({
    width: 400,
    height: 800,
    deviceScaleFactor: 1,
    isMobile: false
});

await page.goto(url, { waitUntil: 'networkidle2' });

const element = await page.$('body');
node.status({ fill: "blue", shape: "ring", text: "taking screenshot" });

const image = await element.screenshot({ encoding: 'base64' });

await browser.close();

node.status({});
msg.payload = image // result = base64

return msg

```

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 November 2025 20:25 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/13 "2025-11-28T20:25:38Z")

</div>

We have wormsign 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a1850471c43130035c46b8ee53b803a4b8d150c1.png)

Got a few errors to start with and then worked out I needed to cd to my .node-red/ folder and run  
npm i puppeteer

and then it worked 🙂

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [28 November 2025 20:39 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/14 "2025-11-28T20:39:38Z")

</div>

Having set width to be bigger I'm now getting enough image to display webcam window

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/86c21c603257363e4686297947043e71ba2d764b.png)

Unfortunately, as you can see, I get a connection failed message

This is exactly what happens if I open a real browser tab on the ip address but after about 5 secs - the webcam image appears

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5ed2f17d21de8f42c7ab24092bd73fa5c3d2ac70.jpeg)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [29 November 2025 04:20 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/15 "2025-11-29T04:20:38Z")

</div>

There are several methods available to wait for certain content to show up.  
What happens if you open a browser to `http://192.168.0.184:3031/video` ?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [29 November 2025 08:40 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/16 "2025-11-29T08:40:44Z")

</div>

> [@bakman2](#):
>
> [http://192.168.0.184:3031/video](http://192.168.0.184:3031/video)

🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/8064d088a1fdd16df236191d4df66834d2573cbd.jpeg)

Where did you unearth that info from?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [29 November 2025 11:52 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/17 "2025-11-29T11:52:27Z")

</div>

Elegoo carbon video feed on google 😉 does the feed start immediately? You probably could also use the pipe to jpeg node to capture an image instead of using puppeteer

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [29 November 2025 12:46 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/18 "2025-11-29T12:46:31Z")

</div>

Google you say? Never heard of it 🙂

Pipe to jpeg node?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 November 2025 13:00 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/19 "2025-11-29T13:00:15Z")

</div>

> **[@kevingodell/node-red-pipe2jpeg](https://flows.nodered.org/node/@kevingodell/node-red-pipe2jpeg)**
>
> Parse a jpeg from a buffer and send it to a downstream node or serve it via http.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 December 2025 11:59 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/20 "2025-12-04T11:59:05Z")

</div>

I've not been able to work out what to do to get images out of the stream purely using NR but I've manged to make VLC take regular snapshots and write it to a png so this will do for the moment

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/818e29f83d5d8a1f1eb13f07dbab85dba41f1aa2.jpeg)

so now comes the hard part - getting it to recognise difference between their being an object on the plate or not 🙂

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [4 December 2025 14:17 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/21 "2025-12-04T14:17:51Z")

</div>

If everything normally is exactly the same from picture to picture, I think I have seen somewhere you can do a contrast or pattern comparison somehow. Assuming change in contrast means "something" new is in the image, most likely your print job if all other conditions are the same...

Or maybe this can help:

> <https://stackoverflow.com/questions/14434426/image-comparison-algorithm-that-ignores-brightness>

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 December 2025 14:21 UTC](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789/22 "2025-12-04T14:21:31Z")

</div>

I'm after something that can tell the difference between an empty plate and something on it where the something could be anything (inc small black object !)

[Next page](https://discourse.nodered.org/t/flow-needed-for-image-recognition/99789.md?page=2)
