Class: Azure::CognitiveServices::ImageSearch::V1_0::Models::RecognizedEntityRegion
- Inherits:
-
Response
- Object
- ResponseBase
- Identifiable
- Response
- Azure::CognitiveServices::ImageSearch::V1_0::Models::RecognizedEntityRegion
- Includes:
- MsRestAzure
- Defined in:
- lib/1.0/generated/azure_cognitiveservices_imagesearch/models/recognized_entity_region.rb
Overview
Defines a region of the image where an entity was found and a list of entities that might match it.
Instance Attribute Summary collapse
-
#_type ⇒ Object
Returns the value of attribute _type.
-
#matching_entities ⇒ Array<RecognizedEntity>
match the entity found in the region.
-
#region ⇒ NormalizedRectangle
entity.
Attributes inherited from Response
Attributes inherited from Identifiable
Class Method Summary collapse
-
.mapper ⇒ Object
Mapper for RecognizedEntityRegion class as Ruby Hash.
Instance Method Summary collapse
-
#initialize ⇒ RecognizedEntityRegion
constructor
A new instance of RecognizedEntityRegion.
Constructor Details
#initialize ⇒ RecognizedEntityRegion
Returns a new instance of RecognizedEntityRegion.
17 18 19 |
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/recognized_entity_region.rb', line 17 def initialize @_type = "RecognizedEntityRegion" end |
Instance Attribute Details
#_type ⇒ Object
Returns the value of attribute _type.
21 22 23 |
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/recognized_entity_region.rb', line 21 def _type @_type end |
#matching_entities ⇒ Array<RecognizedEntity>
match the entity found in the region. The entities are in descending order of confidence (see the matchConfidence field of RecognizedEntity).
37 38 39 |
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/recognized_entity_region.rb', line 37 def matching_entities @matching_entities end |
#region ⇒ NormalizedRectangle
entity. The values of the rectangle are relative to the width and height of the original image and are in the range 0.0 through 1.0. For example, if the image is 300x200 and the region’s top, left corner is at point (10, 20) and the bottom, right corner is at point (290, 150), then the normalized rectangle is: Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = 0.75. For people, the region represents the person’s face.
31 32 33 |
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/recognized_entity_region.rb', line 31 def region @region end |
Class Method Details
.mapper ⇒ Object
Mapper for RecognizedEntityRegion class as Ruby Hash. This will be used for serialization/deserialization.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/recognized_entity_region.rb', line 44 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'RecognizedEntityRegion', type: { name: 'Composite', class_name: 'RecognizedEntityRegion', model_properties: { _type: { client_side_validation: true, required: true, serialized_name: '_type', type: { name: 'String' } }, id: { client_side_validation: true, required: false, read_only: true, serialized_name: 'id', type: { name: 'String' } }, read_link: { client_side_validation: true, required: false, read_only: true, serialized_name: 'readLink', type: { name: 'String' } }, web_search_url: { client_side_validation: true, required: false, read_only: true, serialized_name: 'webSearchUrl', type: { name: 'String' } }, region: { client_side_validation: true, required: false, read_only: true, serialized_name: 'region', type: { name: 'Composite', class_name: 'NormalizedRectangle' } }, matching_entities: { client_side_validation: true, required: false, read_only: true, serialized_name: 'matchingEntities', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'RecognizedEntityElementType', type: { name: 'Composite', class_name: 'RecognizedEntity' } } } } } } } end |