Page 1 of 2

App Developer: USB Webcam Component

Posted: Tue Apr 25, 2023 3:28 pm
by stefan.erni
Hi Ben

How about a component for the App Developer for a webcam connected with a USB cable.
The first thing you should see is an image in a 2D panel.
The easiest would be these cheap cameras with full HD resolution.
Later you should be able to read one (or every) line of the camera with Flowcode.
This way it would be possible to recognise simple objects with flowcode or to use a cheap USB camera as a linear camera.
A real linear camera is much faster and much better but unfortunately expensive.

regards

Stefan

Different very cheap, easy to connect USB cameras
Snag_1dfab2a.png
Snag_1dfab2a.png (232.88 KiB) Viewed 2847 times
A professional linear camera over network (GIGE) with up to 80000 lines per second
Snag_1dfd23a.png
Snag_1dfd23a.png (506.14 KiB) Viewed 2847 times

Re: App Developer: USB Webcam Component

Posted: Wed Apr 26, 2023 2:52 pm
by BenR
Hi Stefan,

We have a canvas object in Flowcode that we can draw bitmap data to, if we can pull a bitmap from the camera source and repeat then should be easy enough.

I'll have a chat with Steve and see what he thinks.

Re: App Developer: USB Webcam Component

Posted: Mon May 15, 2023 10:52 am
by stefan.erni
Hi Ben
I looked at the canvas and that's how it should be.
I only film or photograph two or three white dots with the cameras and want to calculate the distance.
For that I would have to have access to the data array.
I guess I can then also display a cross in the image via an array.
And another little info, the external USB cameras have become even much cheaper.

Of course, other applications can also be made with the cameras like bar-code or QR Code.

regards

Stefan

Re: App Developer: USB Webcam Component

Posted: Wed Jun 10, 2026 7:28 am
by stefan.erni
Hi Ben

Would it be possible to extend the App Developer to display a USB camera in a 2D panel and then save it as a printscreen?

No settings would be necessary.
And printscreen already works very nice in the App Developer

Re: App Developer: USB Webcam Component

Posted: Wed Jun 10, 2026 9:35 am
by Steve-Matrix
Hi Stefan,

Are you referring to PC Developer or Web Developer? And do you require just still images or do you want the panel object to display a moving image?

Re: App Developer: USB Webcam Component

Posted: Wed Jun 10, 2026 10:28 am
by stefan.erni
Hi Steve

I'm referring to PC Developer.

It would also be fine to just take a capture without a live image. So, just a single capture called in the macro.

my suggestion:
If I call the macro it's take a printscreen from the camera panel and save it.
Printscreen_Camera.fcm
(2.21 KiB) Downloaded 24 times
SNAG-0096.PNG
SNAG-0096.PNG (205.65 KiB) Viewed 181 times
I use this component:
2026-06-10_11-09-08.PNG
2026-06-10_11-09-08.PNG (7.74 KiB) Viewed 181 times
with this propertis:
2026-06-10_11-08-41.PNG
2026-06-10_11-08-41.PNG (32.58 KiB) Viewed 181 times
Result:
At the moment it's saving the chart panel
2026-06-10_11-13-20.PNG
2026-06-10_11-13-20.PNG (12.42 KiB) Viewed 181 times

Re: App Developer: USB Webcam Component

Posted: Wed Jun 10, 2026 10:53 am
by Steve-Matrix
Ok, I'll look into that. It's a lot easier in Web Developer (in fact, I've already created the basics of a component for it), but I'll see if there is a way to do this for PC Developer.

Re: App Developer: USB Webcam Component

Posted: Wed Jun 10, 2026 3:34 pm
by stefan.erni
Hi Steve

It would also be possible with the Web app.
Maybe I can test a component already.

For our measurements, we divide the screen into two parts.
The left side shows the PC App, and the right side shows the Web App.
Perhaps later we can use the PC App to force the Web app to take a screenshot.

Re: App Developer: USB Webcam Component

Posted: Wed Jun 10, 2026 4:28 pm
by Steve-Matrix
Hi Stefan,

Here's a very early version of a Camera component for Web Developer. It's likely to change, but you can see what it can do.

The attached example allows a screenshot to be taken from the camera and this is shown as an image.

Re: App Developer: USB Webcam Component

Posted: Thu Jun 11, 2026 8:53 am
by stefan.erni
Hi Steve

Perfect. It works really well.

That's exactly what I need.
Now I just need to figure out how to save the photo in the folder with a date and time stamp after clicking “Take Photo.”

like this:
PIC_2026-06-05_17-50-50.png
C:\All_export

Here is a photo I just took as an example
download (7).png
download (7).png (1.05 MiB) Viewed 102 times