텐서플로우:: ops:: 영역 크기 조정

#include <image_ops.h>

면적 보간법을 사용하여 images size 를 조정합니다.

요약

입력 이미지는 다양한 유형일 수 있지만 출력 이미지는 항상 float형입니다.

수치 정밀도의 한계로 인해 출력 이미지의 픽셀 값 범위가 입력 이미지의 범위와 약간 다를 수 있습니다. 예를 들어 [0.0, 1.0] 과 같은 출력 범위를 보장하려면 출력에 tf.clip_by_value 적용하십시오.

각 출력 픽셀은 먼저 픽셀의 영역을 입력 텐서로 변환한 다음, 해당 영역과 교차하는 픽셀들의 평균을 계산하여 얻어집니다. 입력 픽셀이 평균 계산에 기여하는 정도는 해당 픽셀의 면적 중 영역과 교차하는 부분의 비율에 따라 가중치가 부여됩니다. 이는 OpenCV의 INTER_AREA와 동일한 방식입니다.

논거:

  • 범위: Scope 객체
  • 이미지: [batch, height, width, channels] 형태의 4차원 이미지입니다.
  • size: 2개의 요소( new_height, new_width )로 구성된 1차원 int32 텐서입니다 . 이미지의 새로운 크기입니다.

선택적 속성( Attrs 참조):

  • align_corners: true로 설정하면 입력 및 출력 텐서의 4개 모서리 픽셀 중심이 정렬되고, 모서리 픽셀의 값은 유지됩니다. 기본값은 false입니다.

보고:

  • Output : [batch, new_height, new_width, channels] 형태의 4차원.

생성자와 소멸자

ResizeArea (const :: tensorflow::Scope & scope, :: tensorflow::Input images, :: tensorflow::Input size)
ResizeArea (const :: tensorflow::Scope & scope, :: tensorflow::Input images, :: tensorflow::Input size, const ResizeArea::Attrs & attrs)

공개 속성

operation
resized_images

공공 기능

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

공개 정적 함수

AlignCorners (bool x)

구조

텐서플로우:: ops:: ResizeArea:: Attrs

ResizeArea 에 대한 선택적 속성 설정기입니다.

공개 속성

작업

Operation operation

크기가 조정된 이미지

::tensorflow::Output resized_images

공공 기능

영역 크기 조정

 ResizeArea(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size
)

영역 크기 조정

 ResizeArea(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size,
  const ResizeArea::Attrs & attrs
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const 

공개 정적 함수

모서리 정렬

Attrs AlignCorners(
  bool x
)