App Developer: USB Webcam Component

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
stefan.erni
Valued Contributor
Posts: 1246
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 230 times
Been thanked: 247 times

Flowcode v10 App Developer: USB Webcam Component

Post 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 2829 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 2829 times

BenR
Matrix Staff
Posts: 2223
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 613 times
Been thanked: 806 times

Re: App Developer: USB Webcam Component

Post 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.

stefan.erni
Valued Contributor
Posts: 1246
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 230 times
Been thanked: 247 times

Re: App Developer: USB Webcam Component

Post 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

stefan.erni
Valued Contributor
Posts: 1246
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 230 times
Been thanked: 247 times

Re: App Developer: USB Webcam Component

Post 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

Steve-Matrix
Matrix Staff
Posts: 1930
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 286 times
Been thanked: 448 times

Re: App Developer: USB Webcam Component

Post 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?

stefan.erni
Valued Contributor
Posts: 1246
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 230 times
Been thanked: 247 times

Re: App Developer: USB Webcam Component

Post 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 23 times
SNAG-0096.PNG
SNAG-0096.PNG (205.65 KiB) Viewed 163 times
I use this component:
2026-06-10_11-09-08.PNG
2026-06-10_11-09-08.PNG (7.74 KiB) Viewed 163 times
with this propertis:
2026-06-10_11-08-41.PNG
2026-06-10_11-08-41.PNG (32.58 KiB) Viewed 163 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 163 times

Steve-Matrix
Matrix Staff
Posts: 1930
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 286 times
Been thanked: 448 times

Re: App Developer: USB Webcam Component

Post 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.

stefan.erni
Valued Contributor
Posts: 1246
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 230 times
Been thanked: 247 times

Re: App Developer: USB Webcam Component

Post 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.

Steve-Matrix
Matrix Staff
Posts: 1930
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 286 times
Been thanked: 448 times

Re: App Developer: USB Webcam Component

Post 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.
Attachments
web camera test.fcweb
(13.24 KiB) Downloaded 23 times
WebCamera.fcpx
(3.23 KiB) Downloaded 25 times

stefan.erni
Valued Contributor
Posts: 1246
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 230 times
Been thanked: 247 times

Re: App Developer: USB Webcam Component

Post 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 84 times

Post Reply