Created
June 13, 2021 18:27
-
-
Save banujan6/41422a1118954cc294a9b4251cfbe672 to your computer and use it in GitHub Desktop.
azure cognitive services + angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div style="padding-bottom: 40px;" *ngIf="imageRawString !== null"> | |
<div | |
class="object-marker" | |
*ngFor="let objectData of objects" | |
[ngStyle]="{ | |
'margin-left.px': objectData.rectangle.x / image.ratio, | |
'margin-top.px': objectData.rectangle.y / image.ratio, | |
'width.px': objectData.rectangle.w / image.ratio, | |
'height.px': objectData.rectangle.h / image.ratio | |
}" | |
> | |
<label style="background-color: red;">{{ objectData.object }}</label> | |
</div> | |
<img src="{{ imageRawString }}" [ngStyle]="{'width.px': image.fixedWidth}"/> | |
</div> | |
<input type="file" style="display: none;" accept="image/*" (change)="readImage($event.target)" #uploadFile> | |
<button *ngIf="!isAnalysing" class="upload-btn" (click)="openImageBrowseDialog()">Select an Image</button> | |
<h2 *ngIf="isAnalysing">Analysing Image.... Please Wait!</h2> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment