You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AIR should support to get RGB (not ARGB) pixels from Camera.
First of all, images from classical RGB cameras cannot return alpha channel by itself. So alpha channel is useless for RGB cameras.
Moreover it consumes extra bytes volume (in terms of storage/transferring).
And a lot of image processing/computer vision/OpenCV algorithms wait on processing input formats like:
[R, G, B, R, G, B....] (channel value per index)
[RGB, RGB....] (pixel color value per index)
or [BGR, BGR....] and something like that
no alpha channel.
So if you need to use some image processing algorithms - you need to convert [ARGB, ARGB....] byte arrays to another format. And if you need to use processing in "real time" - it should be done for every frame. Its too heavy extra processing which I wish to avoid. Especially for Android: #1980
It will be great to have some method to get ByteArray from camera image only with necessary channels and in requested format. For example: ARGB, BGRA, RGB, BGR, .... unmultiplied or premultiplied. Also will be great the same feature for any BitmapData (not from camera image).
Feature Description
AIR should support to get RGB (not ARGB) pixels from
Camera
.First of all, images from classical RGB cameras cannot return alpha channel by itself. So alpha channel is useless for RGB cameras.
Moreover it consumes extra bytes volume (in terms of storage/transferring).
And a lot of image processing/computer vision/OpenCV algorithms wait on processing input formats like:
no alpha channel.
So if you need to use some image processing algorithms - you need to convert [ARGB, ARGB....] byte arrays to another format. And if you need to use processing in "real time" - it should be done for every frame. Its too heavy extra processing which I wish to avoid. Especially for Android: #1980
Right now by
Camera::copyToByteArray()
https://airsdk.dev/reference/actionscript/3.0/flash/media/Camera.html#copyToByteArray() or byCamera::copyToVector()
https://airsdk.dev/reference/actionscript/3.0/flash/media/Camera.html#copyToVector() you will get "32-bit unmultiplied pixel values" (ARGB).The same if you try to use
BitmapData::copyPixelsToByteArray()
https://airsdk.dev/reference/actionscript/3.0/flash/display/BitmapData.html#copyPixelsToByteArray()It will be great to have some method to get
ByteArray
from camera image only with necessary channels and in requested format. For example: ARGB, BGRA, RGB, BGR, .... unmultiplied or premultiplied. Also will be great the same feature for anyBitmapData
(not from camera image).Related issues:
#2029
#1344
#305
Known Workarounds
The text was updated successfully, but these errors were encountered: