Skip to content

Commit 262bef4

Browse files
committed
v0.12 and v0.13
1 parent f7beedf commit 262bef4

File tree

19 files changed

+1743
-757
lines changed

19 files changed

+1743
-757
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## v0.13 - 2025-05-18
8+
9+
### Fixed
10+
- Minor Log noise
11+
12+
## v0.12 - 2025-05-18
13+
14+
### Changed
15+
- Camera views accept a target camera resolution as input
16+
- QuickPoseCameraView returns an aspect ratio for using in scaling view
17+
- ComposeFunctionDemo shows aspect ratio corrected view
18+
19+
### Fixed
20+
- Crash linked to fps
21+
- Startup stability issues (for best results call AndroidAssetUtil.initializeNativeAssetManager(this) in your startup code)
22+
723
## v0.11 - 2025-04-30
824

925
### Fixed

SampleApps/Compose/BasicDemoActivity/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ dependencies {
7171

7272
implementation 'com.microsoft.onnxruntime:onnxruntime-android:latest.release'
7373
implementation 'ai.quickpose:quickpose-mp:0.1'
74-
implementation 'ai.quickpose:quickpose-core:0.9'
74+
implementation 'ai.quickpose:quickpose-core:0.12'
7575

7676
implementation 'androidx.core:core-performance:1.0.0-alpha02'
7777

SampleApps/Compose/app/src/main/java/ai/quickpose/camera/QuickPoseCameraSwitchView.kt renamed to SampleApps/Compose/BasicDemoActivity/app/src/main/java/ai/quickpose/camera/QuickPoseCameraSwitchView.kt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package ai.quickpose.camera
33
import ai.quickpose.core.QuickPose
44
import android.content.Context
55
import android.util.AttributeSet
6+
import android.util.Size
67
import android.view.SurfaceView
78
import android.view.View
89
import android.widget.FrameLayout
@@ -14,22 +15,29 @@ constructor(
1415
private var quickPose: QuickPose,
1516
attrs: AttributeSet? = null,
1617
defStyleAttr: Int = 0,
18+
targetResolution: Size = Size(1080, 1920)
1719
) : FrameLayout(context, attrs, defStyleAttr) {
1820

1921
private var frontCameraView: QuickPoseCameraView? = null
2022
private var backCameraView: QuickPoseCameraView? = null
2123
private var frontOverlayView: SurfaceView? = null
2224
private var backOverlayView: SurfaceView? = null
2325

26+
var aspectRatio = 1920f / 1080f
27+
2428
init {
25-
frontCameraView = QuickPoseCameraView(isFrontCamera = true, quickPose, context)
29+
frontCameraView =
30+
QuickPoseCameraView(isFrontCamera = true, quickPose, context, targetResolution)
31+
frontCameraView?.visibility = View.VISIBLE
2632
addView(frontCameraView)
2733

28-
backCameraView = QuickPoseCameraView(isFrontCamera = false, quickPose, context)
34+
backCameraView =
35+
QuickPoseCameraView(isFrontCamera = false, quickPose, context, targetResolution)
2936
backCameraView?.visibility = View.INVISIBLE
3037
addView(backCameraView)
3138

3239
frontOverlayView = SurfaceView(context)
40+
frontOverlayView?.visibility = View.VISIBLE
3341
addView(frontOverlayView)
3442

3543
backOverlayView = SurfaceView(context)
@@ -42,7 +50,7 @@ constructor(
4250
backCameraView?.stop()
4351
}
4452

45-
suspend fun start(useFrontCamera: Boolean) {
53+
suspend fun start(useFrontCamera: Boolean): Float {
4654
if (useFrontCamera) {
4755
backCameraView?.stop()
4856

@@ -52,7 +60,7 @@ constructor(
5260
frontCameraView?.visibility = View.VISIBLE
5361
frontOverlayView?.visibility = View.VISIBLE
5462

55-
frontCameraView?.start()
63+
this.aspectRatio = frontCameraView?.start() ?: 1920f / 1080f
5664
quickPose.setOverlayView(frontOverlayView)
5765
} else {
5866
frontCameraView?.stop()
@@ -62,8 +70,9 @@ constructor(
6270
backCameraView?.visibility = View.VISIBLE
6371
backOverlayView?.visibility = View.VISIBLE
6472

65-
backCameraView?.start()
73+
this.aspectRatio = backCameraView?.start() ?: 1920f / 1080f
6674
quickPose.setOverlayView(backOverlayView)
6775
}
76+
return this.aspectRatio
6877
}
6978
}

0 commit comments

Comments
 (0)