flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
9.59k stars 372 forks source link

`Camera` control #1281

Open monkeycc opened 1 year ago

monkeycc commented 1 year ago

Please Describe The Problem To Be Solved

Web or desktop client Directly call the camera

(Optional): Suggest A Solution

camera https://pub.dev/packages/camera

A Flutter plugin for iOS, Android and Web allowing access to the device cameras.

Display live camera preview in a widget. Snapshots can be captured and saved to a file. Record video. Add access to the image stream from Dart.

Working with camera stream: https://www.youtube.com/watch?v=oqfCCWhNe7s https://pub.dev/documentation/camera/latest/camera/CameraController/startImageStream.html

ndonkoHenri commented 1 year ago

Is there perhaps any desktop plugin too?

monkeycc commented 1 year ago

也许也有桌面插件吗?

Opencv ? cv2.VideoCapture(0)

goyalyashpal commented 10 months ago
Python-Zhao commented 5 months ago

Have been looking forward to the camera control, do not know when to use.

Python-Zhao commented 5 months ago

Recently, I used Flet to do an information management project, and I wanted to use the mobile phone to open the camera and scan the QR code to obtain information, but it was not possible.

goncaze commented 4 months ago

@Python-Zhao, Hello! Still can't access the camera on your Flet app?

Python-Zhao commented 4 months ago

@goncaze ,Yes, I have been using Python to develop projects, I want to call the camera to achieve scan code query, scan code login, photo recognition, I publish my project as PWA, I use "cap = cv2.VideoCapture(0)" to call the local camera, it can be used on Windows. However, I have been unable to access the camera when using the camera function on the phone. Is there any solution? So I'm just going to learn Dart and then redevelop with Flutter.

glira commented 2 months ago

也许也有桌面插件吗?

Opencv ? cv2.VideoCapture(0)

no work to android, just in linux

jibinjp commented 1 month ago

Why was the "platform:mobile" label removed? Even, with using cv2 from within the Fet framework there is no way to add a key interrupt to pause or stop the camera once its started, unless the app itself is refreshed which defeats the purpose

C69Xg3sg9PAvYK commented 1 month ago

@goncaze ,Yes, I have been using Python to develop projects, I want to call the camera to achieve scan code query, scan code login, photo recognition, I publish my project as PWA, I use "cap = cv2.VideoCapture(0)" to call the local camera, it can be used on Windows. However, I have been unable to access the camera when using the camera function on the phone. Is there any solution? So I'm just going to learn Dart and then redevelop with Flutter.

I'm in the same boat as you are. Hoping this would be introduced soon

ndonkoHenri commented 1 month ago

Why was the "platform:mobile" label removed?

Because the Camera control to be implemented is not just mobile specific. It's for all the platforms...

metrolunar commented 1 month ago

My use case is mobile phone specific.

Just need to press a button to take a picture and store it locally for upload to a server for more processing.

Abduguru commented 1 month ago

Please can I create application that is not web app with flet and run it on android