cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Camera Widget: Auto-accept capture image

NA_nur
12-Amethyst

Camera Widget: Auto-accept capture image

I want to capture data matrix label since data matrix scanning not available in Hololens II. Then, OCR will read the data matrix value. Example as picture below:

 

NA_nur_1-1629684389571.png

 

So, below is sequence of how camera widget work in Hololens II.

1. 3 seconds countdown
2. Camera sound
3. Image preview with cancel, retake accept button

 

But in this case, there's a delay around 2~3 seconds between 2. Camera sound and 3. Image preview.

Is it possible to customize camera widget to eliminate :

1. delay
2. cancel, retake and accept button

NA_nur_2-1629684820675.png

 

I would like the camera to auto-accept image like usual camera work which image automatically taken on user click shutter.

 

Thank you.

ACCEPTED SOLUTION

Accepted Solutions

unfortunately, it's not available in the hololens yet. 

i dont control the priority queues unfortunately  but i've prompted the PM team to take a look. 

 

as for ios etc., here's some code you can try out -

 

1. create a text widget (called "text")and a3d image called "photocapture"

2. add the javascript below

3. link a button 'click ' even to the '$scope.screenshot' (or screenshotNo3D).

4. run the experience; each time you click the button, you'll get an immediate (ish) response and the image will show in the experience.

obviously you dont need the text or image widgets - they are just here to demonstrate.

 

 

var callback = function (pngBase64String, args) {
$scope.view.wdg.photocapture.src='data:image/png;base64,' + pngBase64String;
$scope.view.wdg.text.text = args;
$scope.$applyAsync();
};

// params = { dataURL:bool, withAugmentation: bool, imgFormat: string, imgWidth: number, imgHeight:number}
$scope.screenShot = function() {
var params = {withAugmentation: true};
tml3dRenderer.takeScreenshot(params, callback, null);
}

$scope.screenShotNo3D = function() {
var params = {withAugmentation: false};
tml3dRenderer.takeScreenshot(params, callback, null);

}

 

 

happy snapping.

View solution in original post

4 REPLIES 4
SteveGhee
12-Amethyst
(To:NA_nur)

For IOS/Android devices, the way around this is to use th underlying API to capture images; this way tyou can sidestep the UI and the accept etc. buttons.

This request has recently been made to support the same capability on the hololens.   Hopefully this enhancement will be addressed quite quickly.

Hi Steve,

 

I have the same issue and need to snap an automatic image to send to AI in cloud for image classification.  can you shar emore of the API details form mobiel and also confirm if its on Hololens2 yet?

 

Regards

 

Adrian

unfortunately, it's not available in the hololens yet. 

i dont control the priority queues unfortunately  but i've prompted the PM team to take a look. 

 

as for ios etc., here's some code you can try out -

 

1. create a text widget (called "text")and a3d image called "photocapture"

2. add the javascript below

3. link a button 'click ' even to the '$scope.screenshot' (or screenshotNo3D).

4. run the experience; each time you click the button, you'll get an immediate (ish) response and the image will show in the experience.

obviously you dont need the text or image widgets - they are just here to demonstrate.

 

 

var callback = function (pngBase64String, args) {
$scope.view.wdg.photocapture.src='data:image/png;base64,' + pngBase64String;
$scope.view.wdg.text.text = args;
$scope.$applyAsync();
};

// params = { dataURL:bool, withAugmentation: bool, imgFormat: string, imgWidth: number, imgHeight:number}
$scope.screenShot = function() {
var params = {withAugmentation: true};
tml3dRenderer.takeScreenshot(params, callback, null);
}

$scope.screenShotNo3D = function() {
var params = {withAugmentation: false};
tml3dRenderer.takeScreenshot(params, callback, null);

}

 

 

happy snapping.

Announcements

Top Tags