Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 5ce1334

Browse files
committed
Update README.md
1 parent 6e97bfb commit 5ce1334

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ On Android `orientation = all` is available, on the desktop you can change the w
107107
| QR | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |
108108
| OpenCV | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |
109109
| MLKit | | | | :heavy_check_mark: | | |
110-
| TFLite | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: |
110+
| TFLite | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: |
111111

112112
- Windows : Windows 11, i7-10 @ 1.1GHz, Python 3.8.2 Kivy==2.1.0.dev0
113113
- Windows : Windows 10, i3-7 @ 2.4GHz, Python 3.9.7 Kivy==2.0.0
@@ -188,6 +188,8 @@ Overrides the default sensor resolution, which is the highest resolution availab
188188
##### analyze_pixels_resolution
189189
Sets the pixels resolution passed by `analyze_pixels_callback()`. A scalar, representing the number of pixels on the long edge, the short edge is determined using the aspect ratio. For example `analyze_pixels_resolution = 720`. The default is the minimum of cropped sensor resolution and 1024.
190190

191+
As an alternative, sometimes the analysis package will need to set the resolution. This is done with `self.auto_analyze_resolution` as described in [Analyze Configuration](https://github.com/Android-for-Python/camera4kivy#analyze-configuration).
192+
191193
##### enable_analyze_pixels
192194
Use `enable_analyze_pixels = True` to enable the `analyze_pixels_callback()`
193195

@@ -207,12 +209,15 @@ Applies only to the Android ImageProxy api. 'yuv420' (default) or 'rgba'.
207209

208210
#### Disconnect Camera
209211

210-
Always do this. It is sometimes critically important to disconnect the camera when it is no longer used.
212+
Always do this, it is important to disconnect the camera when not in use.
211213

212214
```python
213215
def disconnect_camera(self):
214216
```
215-
There may be [latency](https://github.com/Android-for-Python/Camera4Kivy#latency) concequences of disconnecting the camera after initiating a capture and before a filepath_callback.
217+
218+
A disconnect while a capture is in progress generally results in termination of the capture and saving the result as usual.
219+
220+
However on Android a disconnect immediately after a capture has be initiated may prevent the start of the file save and nothing is saved. A warning message is reported by filepath_callback, this may be filtered as shown in [this example](https://github.com/Android-for-Python/c4k_photo_example/blob/main/applayout/toast.py#L15)
216221

217222
#### Capture
218223
```python
@@ -421,7 +426,9 @@ To change the default analysis resolution specify the number of pixels in the lo
421426

422427
`connect_camera(enable_analyze_pixels = True, analyze_pixels_resolution = 720)`
423428

424-
The pixels api provides images with the same orientation and aspect ratio as the Preview.
429+
The `analyze_pixels_resolution` option provides analysis images with the same orientation and aspect ratio as the Preview.
430+
431+
As an alternative the analysis software may set `self.auto_analyze_resolution` a two element list of [width, height]. In this case the aspect ratio is not necessarily maintained for analysis, the `analyze_pixels_callback()` `image_scale` parameter is a two element list [width, height] allowing scaling of any results. As used in [c4k_tflite_example classifyobject.py](https://github.com/Android-for-Python/c4k_tflite_example/blob/main/classifyobject.py).
425432

426433
On Android only, the imageproxy api is an alternative to the pixels api.
427434

@@ -487,14 +494,6 @@ The `analyze_imageproxy_callback()` implements a graceful degradation mechanism.
487494

488495
Nothing to do with a camera, it is a physical property of a screen. A scalar measured in dpi.
489496

490-
### Latency
491-
492-
Connecting/disconnecting the camera, switching between cameras, and image or video capture all take a finite time; and may occur in their own threads. Preview prioritizes completing image or video capture over disconnecting or switching cameras. In this case the disconnect or camera switch will be slightly delayed.
493-
494-
In the case of a delayed disconnect, it is possible the camera will not be available for an immediate connect - say from a new screen. In this case there is a slight possibility of a white Preview in the new screen. This can be handled in the app, say by delaying exit from this screen until the filepath_callback has occured.
495-
496-
497-
498497
## Camera Provider
499498

500499
Camera4Kivy depends on a 'camera provider' to access the OS camera api. On most platforms this uses the same provider as Kivy, with modified defaults.
@@ -568,9 +567,9 @@ There is no way to specify inverted letterboxing. Where the Preview exactly fits
568567

569568
It probably will have issues, don't expect it to work.
570569

571-
### Behavior: Raspberry PI video frame rate is lower than other platforms.
570+
### Behavior: Emulated GPU frame rate is lower than other platforms.
572571

573-
Functional, but with a low frame rate. The issue is probably related to the current picamera implementation, try Gstreamer or OpenCV.
572+
Devices with an emulated GPU are probably unusably slow.
574573

575574
### Behavior: Raspberry PI Bullseye not available
576575

0 commit comments

Comments
 (0)