GenerateVideoAnnotationPatch
class GenerateVideoAnnotationPatch extends GenerateAnnotationPatch
Traits
Properties
protected Annotation | $annotation | The the annotation to generate a patch for. |
from GenerateAnnotationPatch |
protected string | $targetDisk | The storage disk to store the annotation patches to. |
from GenerateAnnotationPatch |
protected bool | $deleteWhenMissingModels | Ignore this job if the annotation does not exist any more. |
from GenerateAnnotationPatch |
Methods
Determine if this job should retry instead of fail after an exception
Calculate the bounding rectangle of the patch to extract.
Adjust the position and size of the patch rectangle so it is contained in the image.
Get the FFMpeg video instance.
Get a video frame from a specific time as VipsImage object.
Details
in
GenerateAnnotationPatch at line 52
void
__construct(Annotation $annotation, string|null $targetDisk = null)
Create a new job instance.
in
GenerateAnnotationPatch at line 65
void
handle()
Execute the job.
at line 20
handleFile(VolumeFile $file, string $path)
Handle a single image.
in
GenerateAnnotationPatch at line 95
protected string
getTargetPath(Annotation $annotation)
Assemble the target path for an annotation patch.
in
GenerateAnnotationPatch at line 118
protected bool
shouldRetryAfterException(Exception $e)
Determine if this job should retry instead of fail after an exception
in
GenerateAnnotationPatch at line 139
protected array
getPatchRect(array $points, Shape $shape, int $thumbWidth, int $thumbHeight)
Calculate the bounding rectangle of the patch to extract.
in
GenerateAnnotationPatch at line 231
protected array
makeRectContained(array $rect, Image $image)
Adjust the position and size of the patch rectangle so it is contained in the image.
in
GenerateAnnotationPatch at line 255
protected string
getAnnotationPatch(Image $image, array $points, Shape $shape)
Get the annotation patch as buffer.
at line 43
protected Video
getVideo(string $path)
Get the FFMpeg video instance.
at line 56
protected Image
getVideoFrame(Video $video, float $time)
Get a video frame from a specific time as VipsImage object.