tensorflow:: אופס:: DecodeAndCropJpeg

#include <image_ops.h>

פענוח וחיתוך תמונה מקודדת JPEG לטנזור uint8.

סיכום

channels attr מציינים את המספר הרצוי של ערוצי צבע עבור התמונה המפוענחת.

הערכים המקובלים הם:

  • 0: השתמש במספר הערוצים בתמונה מקודדת JPEG.
  • 1: פלט תמונה בגווני אפור.
  • 3: פלט תמונת RGB.

במידת הצורך, התמונה המקודדת JPEG עוברת טרנספורמציה כך שתתאים למספר המבוקש של ערוצי הצבע.

ratio attr מאפשר להקטין את קנה המידה של התמונה בגורם מספר שלם במהלך הפענוח. הערכים המותרים הם: 1, 2, 4 ו-8. זה הרבה יותר מהיר מאשר הקטנת קנה המידה של התמונה מאוחר יותר.

זה שווה ערך לשילוב של פענוח וחיתוך, אבל הרבה יותר מהיר רק על ידי פענוח של תמונת JPEG חלקית.

טיעונים:

  • scope: אובייקט Scope
  • תוכן: 0-D. התמונה מקודדת JPEG.
  • crop_window: 1-D. חלון החיתוך: [crop_y, crop_x, crop_height, crop_width].

מאפיינים אופציונליים (ראה Attrs ):

  • ערוצים: מספר ערוצי צבע עבור התמונה המפוענחת.
  • יחס: יחס ירידה בקנה המידה.
  • fancy_upscaling: אם זה נכון, השתמש בשינוי קנה מידה איטי יותר אך נחמד יותר של מישורי ה-chroma (yuv420/422 בלבד).
  • try_recover_truncated: אם נכון נסה לשחזר תמונה מקלט קטוע.
  • acceptable_fraction: החלק המינימלי הנדרש של שורות לפני קבלת קלט קטוע.
  • dct_method: מחרוזת המציינת רמז לגבי האלגוריתם המשמש לפירוק. ברירת המחדל היא "" אשר ממופה לברירת מחדל ספציפית למערכת. ערכים חוקיים כרגע הם ["INTEGER_FAST", "INTEGER_ACCURATE"]. ניתן להתעלם מהרמז (למשל, ספריית ה-jpeg הפנימית משתנה לגרסה שאין לה אפשרות ספציפית זו).

החזרות:

  • Output : תלת מימד עם צורה [height, width, channels] ..

בנאים והורסים

DecodeAndCropJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, :: tensorflow::Input crop_window)
DecodeAndCropJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, :: tensorflow::Input crop_window, const DecodeAndCropJpeg::Attrs & attrs)

תכונות ציבוריות

image
operation

תפקידים ציבוריים

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

פונקציות סטטיות ציבוריות

AcceptableFraction (float x)
Channels (int64 x)
DctMethod (StringPiece x)
FancyUpscaling (bool x)
Ratio (int64 x)
TryRecoverTruncated (bool x)

מבנים

tensorflow:: ops:: DecodeAndCropJpeg:: Attrs

קובעי תכונות אופציונליים עבור DecodeAndCropJpeg .

תכונות ציבוריות

תמונה

::tensorflow::Output image

מבצע

Operation operation

תפקידים ציבוריים

DecodeAndCropJpeg

 DecodeAndCropJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents,
  ::tensorflow::Input crop_window
)

DecodeAndCropJpeg

 DecodeAndCropJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents,
  ::tensorflow::Input crop_window,
  const DecodeAndCropJpeg::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const 

פונקציות סטטיות ציבוריות

שבר מקובל

Attrs AcceptableFraction(
  float x
)

ערוצים

Attrs Channels(
  int64 x
)

DctMethod

Attrs DctMethod(
  StringPiece x
)

FancyUpscaling

Attrs FancyUpscaling(
  bool x
)

יַחַס

Attrs Ratio(
  int64 x
)

TryRecoverTruncated

Attrs TryRecoverTruncated(
  bool x
)