Class: Google::Apis::VisionV1::WebDetection

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/vision_v1/classes.rb,
lib/google/apis/vision_v1/representations.rb,
lib/google/apis/vision_v1/representations.rb

Overview

Relevant information for the image from the Internet.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WebDetection

Returns a new instance of WebDetection.



10123
10124
10125
# File 'lib/google/apis/vision_v1/classes.rb', line 10123

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#best_guess_labelsArray<Google::Apis::VisionV1::WebLabel>

The service's best guess as to the topic of the request image. Inferred from similar images on the open web. Corresponds to the JSON property bestGuessLabels



10093
10094
10095
# File 'lib/google/apis/vision_v1/classes.rb', line 10093

def best_guess_labels
  @best_guess_labels
end

#full_matching_imagesArray<Google::Apis::VisionV1::WebImage>

Fully matching images from the Internet. Can include resized copies of the query image. Corresponds to the JSON property fullMatchingImages



10099
10100
10101
# File 'lib/google/apis/vision_v1/classes.rb', line 10099

def full_matching_images
  @full_matching_images
end

#pages_with_matching_imagesArray<Google::Apis::VisionV1::WebPage>

Web pages containing the matching images from the Internet. Corresponds to the JSON property pagesWithMatchingImages



10104
10105
10106
# File 'lib/google/apis/vision_v1/classes.rb', line 10104

def pages_with_matching_images
  @pages_with_matching_images
end

#partial_matching_imagesArray<Google::Apis::VisionV1::WebImage>

Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops. Corresponds to the JSON property partialMatchingImages



10111
10112
10113
# File 'lib/google/apis/vision_v1/classes.rb', line 10111

def partial_matching_images
  @partial_matching_images
end

#visually_similar_imagesArray<Google::Apis::VisionV1::WebImage>

The visually similar image results. Corresponds to the JSON property visuallySimilarImages



10116
10117
10118
# File 'lib/google/apis/vision_v1/classes.rb', line 10116

def visually_similar_images
  @visually_similar_images
end

#web_entitiesArray<Google::Apis::VisionV1::WebEntity>

Deduced entities from similar images on the Internet. Corresponds to the JSON property webEntities



10121
10122
10123
# File 'lib/google/apis/vision_v1/classes.rb', line 10121

def web_entities
  @web_entities
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10128
10129
10130
10131
10132
10133
10134
10135
# File 'lib/google/apis/vision_v1/classes.rb', line 10128

def update!(**args)
  @best_guess_labels = args[:best_guess_labels] if args.key?(:best_guess_labels)
  @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
  @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
  @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
  @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
  @web_entities = args[:web_entities] if args.key?(:web_entities)
end