Cloud Vision V1 Client - Class SafeSearchAnnotation (1.7.6)

Reference documentation and code samples for the Cloud Vision V1 Client class SafeSearchAnnotation.

Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).

Generated from protobuf message google.cloud.vision.v1.SafeSearchAnnotation

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ adult int

Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.

↳ spoof int

Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.

↳ medical int

Likelihood that this is a medical image.

↳ violence int

Likelihood that this image contains violent content.

↳ racy int

Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.

getAdult

Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.

Returns
TypeDescription
int

setAdult

Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSpoof

Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.

Returns
TypeDescription
int

setSpoof

Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getMedical

Likelihood that this is a medical image.

Returns
TypeDescription
int

setMedical

Likelihood that this is a medical image.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getViolence

Likelihood that this image contains violent content.

Returns
TypeDescription
int

setViolence

Likelihood that this image contains violent content.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getRacy

Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.

Returns
TypeDescription
int

setRacy

Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAdultConfidence

Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Returns
TypeDescription
float

setAdultConfidence

Confidence of adult_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getSpoofConfidence

Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Returns
TypeDescription
float

setSpoofConfidence

Confidence of spoof_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getMedicalConfidence

Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Returns
TypeDescription
float

setMedicalConfidence

Confidence of medical_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getViolenceConfidence

Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Returns
TypeDescription
float

setViolenceConfidence

Confidence of violence_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getRacyConfidence

Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Returns
TypeDescription
float

setRacyConfidence

Confidence of racy_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getNsfwConfidence

Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Returns
TypeDescription
float

setNsfwConfidence

Confidence of nsfw_score. Range [0, 1]. 0 means not confident, 1 means very confident.

Parameter
NameDescription
var float
Returns
TypeDescription
$this