Skip to content

Commit 84383b8

Browse files
committed
Udpate readme.md and changelog.md
1 parent 018b66c commit 84383b8

File tree

2 files changed

+33
-28
lines changed

2 files changed

+33
-28
lines changed

CHANGELOG.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,24 @@ All notable changes to the AI MultiBarcode Capture Application are documented in
44

55
### Version 1.36 - ⚡ **Performance & Android 15+ Compatibility**
66

7-
**High-performance native image processing with NDK/JNI and Android 15+ 16KB page size support.**
7+
**Ultra-fast native grayscale image processing with NDK/JNI and Android 15+ 16KB page size support.**
88

9-
#### **Native NDK Performance Optimization:**
9+
#### **Native NDK Grayscale Optimization:**
1010

11-
**JNI-Based Image Cropping**: Native C++ implementation for capture zone image processing
12-
- **High-Performance YUV to RGB Conversion**: Optimized native code using integer math with fixed-point arithmetic (BT.601 coefficients scaled by 1024)
11+
**Ultra-Fast Y-Plane Extraction**: Native C++ implementation extracts grayscale directly from YUV Y-plane
12+
- **No Color Conversion Required**: Y-plane IS grayscale - just copy it directly (no YUV→RGB math needed)
13+
- **Single Plane Processing**: Only reads Y-plane, completely skips U/V planes
1314
- **Direct Bitmap Writing**: Native code writes directly to Android Bitmap using `AndroidBitmap_lockPixels()` for zero-copy operation
1415
- **Automatic Fallback**: Graceful Java implementation fallback when native library is unavailable
15-
- **BT.601 Color Space**: Proper YUV to RGB conversion using standard broadcast coefficients
1616

17-
**Performance Benefits**:
18-
- Significantly faster capture zone cropping compared to pure Java implementation
19-
- Reduced CPU usage during barcode scanning with capture zone enabled
20-
- Lower memory allocation overhead through direct buffer processing
21-
- Optimized for real-time barcode detection workflows
17+
**Performance Comparison** (Old RGB vs New Grayscale):
18+
19+
| Metric | YUV→RGB | Y→Grayscale | Improvement |
20+
|--------|---------|-------------|-------------|
21+
| Planes processed | 3 (Y,U,V) | 1 (Y only) | 3x less data |
22+
| Operations/pixel | ~15 | ~3 | 5x fewer ops |
23+
| Color math | Yes (BT.601) | None | No computation |
24+
| Memory reads | 3 buffers | 1 buffer | 3x less I/O |
2225

2326
#### 📱 **Android 15+ 16KB Page Size Support:**
2427

@@ -30,8 +33,8 @@ All notable changes to the AI MultiBarcode Capture Application are documented in
3033
#### 🔧 **Technical Implementation:**
3134

3235
**Native Library (`libyuvprocessor.so`)**:
33-
- `cropYuvToBitmapNative()`: Direct YUV420 to Bitmap conversion with cropping
34-
- `cropYuvToRgbNative()`: YUV420 to RGB pixel array conversion with cropping
36+
- `cropYToGrayscaleBitmapNative()`: Ultra-fast Y-plane to grayscale Bitmap (primary method)
37+
- `cropYuvToBitmapNative()`: Full YUV420 to RGB Bitmap conversion (available if needed)
3538
- ARM NEON SIMD optimization on 32-bit devices (`-mfpu=neon` for armeabi-v7a)
3639
- Aggressive compiler optimizations: `-O3 -ffast-math` for maximum performance
3740

@@ -42,15 +45,16 @@ All notable changes to the AI MultiBarcode Capture Application are documented in
4245

4346
**Java Integration**:
4447
- `NativeYuvProcessor.java`: JNI wrapper class with static library loading
48+
- `cropYuvToGrayscaleNative()`: Primary method using Y-plane extraction
49+
- `cropYuvToGrayscaleJava()`: Java fallback for devices without native support
4550
- `isAvailable()`: Runtime check for native library availability
46-
- Transparent fallback to Java implementation in `BarcodeAnalyzer.java`
4751

4852
#### 💡 **Benefits:**
4953

50-
**Faster Capture Zone Processing**: Native code provides significant speedup for capture zone image cropping
54+
**Maximum Performance**: Grayscale Y-plane extraction is the fastest possible approach for capture zone cropping
5155
**Android 15+ Ready**: Application prepared for upcoming Android devices with 16KB page sizes
52-
**Battery Efficiency**: Reduced CPU usage extends battery life during extended scanning sessions
53-
**Consistent Performance**: Reliable operation across diverse device hardware configurations
56+
**Battery Efficiency**: Minimal CPU usage extends battery life during extended scanning sessions
57+
**SDK Compatible**: Zebra AI Vision SDK fully supports grayscale bitmap input for barcode detection
5458
**Enterprise Scalability**: Improved performance supports high-volume barcode capture workflows
5559

5660
---

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ https://github.com/ltrudu/AI_MutliBarcodes_Capture
1717

1818
### Version 1.36 - ⚡ **Performance & Android 15+ Compatibility**
1919

20-
**High-performance native image processing with NDK/JNI and Android 15+ 16KB page size support.**
20+
**Ultra-fast native grayscale image processing with NDK/JNI and Android 15+ 16KB page size support.**
2121

22-
#### **Native NDK Performance Optimization:**
22+
#### **Native NDK Grayscale Optimization:**
2323

24-
**JNI-Based Image Cropping**: Native C++ implementation for capture zone image processing
25-
- **High-Performance YUV to RGB Conversion**: Optimized native code using integer math with fixed-point arithmetic
26-
- **Direct Bitmap Writing**: Native code writes directly to Android Bitmap using `AndroidBitmap_lockPixels()` for zero-copy operation
24+
**Ultra-Fast Y-Plane Extraction**: Native C++ implementation extracts grayscale directly from YUV Y-plane
25+
- **No Color Conversion Required**: Y-plane IS grayscale - just copy it directly (no YUV→RGB math)
26+
- **Single Plane Processing**: Only reads Y-plane, skips U/V planes entirely
27+
- **Direct Bitmap Writing**: Native code writes directly to Android Bitmap using `AndroidBitmap_lockPixels()`
2728
- **Automatic Fallback**: Java implementation fallback when native library is unavailable
28-
- **BT.601 Color Space**: Proper YUV to RGB conversion using standard broadcast coefficients
2929

3030
**Performance Benefits**:
31-
- Significantly faster capture zone cropping compared to Java implementation
32-
- Reduced CPU usage during barcode scanning with capture zone enabled
33-
- Lower memory allocation overhead through direct buffer processing
34-
- Optimized for real-time barcode detection workflows
31+
- ~3-5x faster than full YUV to RGB conversion
32+
- Minimal CPU usage - simple memory copy instead of color math
33+
- Only 1 plane processed instead of 3
34+
- ~3 operations per pixel instead of ~15
3535

3636
#### 📱 **Android 15+ 16KB Page Size Support:**
3737

@@ -42,9 +42,10 @@ https://github.com/ltrudu/AI_MutliBarcodes_Capture
4242

4343
#### 💡 **Benefits:**
4444

45-
**Faster Capture Zone Processing**: Native code provides significant speedup for capture zone image cropping
45+
**Maximum Performance**: Grayscale extraction is the fastest possible approach for capture zone cropping
4646
**Android 15+ Ready**: Application is prepared for upcoming Android devices with 16KB page sizes
47-
**Battery Efficiency**: Reduced CPU usage extends battery life during extended scanning sessions
47+
**Battery Efficiency**: Minimal CPU usage extends battery life during extended scanning sessions
48+
**SDK Compatible**: Zebra AI Vision SDK fully supports grayscale bitmap input
4849

4950

5051
---

0 commit comments

Comments
 (0)