GoogleCloudVideointelligenceV1TextSegment.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\CloudVideoIntelligence;
  18. class GoogleCloudVideointelligenceV1TextSegment extends \Google\Collection
  19. {
  20. protected $collection_key = 'frames';
  21. /**
  22. * Confidence for the track of detected text. It is calculated as the highest
  23. * over all frames where OCR detected text appears.
  24. *
  25. * @var float
  26. */
  27. public $confidence;
  28. protected $framesType = GoogleCloudVideointelligenceV1TextFrame::class;
  29. protected $framesDataType = 'array';
  30. protected $segmentType = GoogleCloudVideointelligenceV1VideoSegment::class;
  31. protected $segmentDataType = '';
  32. /**
  33. * Confidence for the track of detected text. It is calculated as the highest
  34. * over all frames where OCR detected text appears.
  35. *
  36. * @param float $confidence
  37. */
  38. public function setConfidence($confidence)
  39. {
  40. $this->confidence = $confidence;
  41. }
  42. /**
  43. * @return float
  44. */
  45. public function getConfidence()
  46. {
  47. return $this->confidence;
  48. }
  49. /**
  50. * Information related to the frames where OCR detected text appears.
  51. *
  52. * @param GoogleCloudVideointelligenceV1TextFrame[] $frames
  53. */
  54. public function setFrames($frames)
  55. {
  56. $this->frames = $frames;
  57. }
  58. /**
  59. * @return GoogleCloudVideointelligenceV1TextFrame[]
  60. */
  61. public function getFrames()
  62. {
  63. return $this->frames;
  64. }
  65. /**
  66. * Video segment where a text snippet was detected.
  67. *
  68. * @param GoogleCloudVideointelligenceV1VideoSegment $segment
  69. */
  70. public function setSegment(GoogleCloudVideointelligenceV1VideoSegment $segment)
  71. {
  72. $this->segment = $segment;
  73. }
  74. /**
  75. * @return GoogleCloudVideointelligenceV1VideoSegment
  76. */
  77. public function getSegment()
  78. {
  79. return $this->segment;
  80. }
  81. }
  82. // Adding a class alias for backwards compatibility with the previous class name.
  83. class_alias(GoogleCloudVideointelligenceV1TextSegment::class, 'Google_Service_CloudVideoIntelligence_GoogleCloudVideointelligenceV1TextSegment');