Google\Cloud\Vision\Annotation::landmarks PHP Method

landmarks() public method

Example: $landmarks = $annotation->landmarks();
public landmarks ( ) : Entity[] | null
return Google\Cloud\Vision\Annotation\Entity[] | null
    public function landmarks()
    {
        return $this->landmarks;
    }

Usage Example

 public function testConstruct()
 {
     $res = ['faceAnnotations' => [['landmarks' => []]], 'landmarkAnnotations' => ['foo' => ['bat' => 'bar']], 'logoAnnotations' => ['foo' => ['bat' => 'bar']], 'labelAnnotations' => ['foo' => ['bat' => 'bar']], 'textAnnotations' => ['foo' => ['bat' => 'bar']], 'safeSearchAnnotation' => ['foo' => ['bat' => 'bar']], 'imagePropertiesAnnotation' => ['foo' => ['bat' => 'bar']], 'error' => ['foo' => ['bat' => 'bar']]];
     $ann = new Annotation($res);
     $this->assertInstanceOf(Face::class, $ann->faces()[0]);
     $this->assertInstanceOf(Entity::class, $ann->landmarks()[0]);
     $this->assertInstanceOf(Entity::class, $ann->logos()[0]);
     $this->assertInstanceOf(Entity::class, $ann->labels()[0]);
     $this->assertInstanceOf(Entity::class, $ann->text()[0]);
     $this->assertInstanceOf(SafeSearch::class, $ann->safeSearch());
     $this->assertInstanceOf(ImageProperties::class, $ann->imageProperties());
     $this->assertEquals($res['error'], $ann->error());
     $this->assertEquals($res, $ann->info());
 }