จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: DecodeAndCropJpeg:: คุณสมบัติ
#include <image_ops.h>
ตัวตั้งค่าแอตทริบิวต์เพิ่มเติมสำหรับ DecodeAndCropJpeg
สรุป
งานสาธารณะ |
---|
AcceptableFraction (float x) | เศษส่วนของบรรทัดที่ต้องการขั้นต่ำก่อนที่จะยอมรับอินพุตที่ถูกตัดทอน |
Channels (int64 x) | จำนวนช่องสีสำหรับภาพที่ถอดรหัส |
DctMethod (StringPiece x) | สตริงที่ระบุคำใบ้เกี่ยวกับอัลกอริทึมที่ใช้สำหรับการบีบอัด |
FancyUpscaling (bool x) | หากเป็นจริงให้ใช้การลดขนาดของระนาบโครมาที่ช้ากว่าแต่ดีกว่า (เฉพาะ yuv420/422 เท่านั้น) |
Ratio (int64 x) | อัตราส่วนการลดขนาด |
TryRecoverTruncated (bool x) | หากเป็นจริง ให้ลองกู้คืนรูปภาพจากอินพุตที่ถูกตัดทอน |
คุณลักษณะสาธารณะ
ยอมรับได้_เศษส่วน_
float tensorflow::ops::DecodeAndCropJpeg::Attrs::acceptable_fraction_ = 1.0f
ช่อง_
int64 tensorflow::ops::DecodeAndCropJpeg::Attrs::channels_ = 0
dct_method_
StringPiece tensorflow::ops::DecodeAndCropJpeg::Attrs::dct_method_ = ""
แฟนซี_อัปสเกล_
bool tensorflow::ops::DecodeAndCropJpeg::Attrs::fancy_upscaling_ = true
อัตราส่วน_
int64 tensorflow::ops::DecodeAndCropJpeg::Attrs::ratio_ = 1
ลอง_กู้คืน_ตัดทอน_
bool tensorflow::ops::DecodeAndCropJpeg::Attrs::try_recover_truncated_ = false
งานสาธารณะ
เศษส่วนที่ยอมรับได้
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::AcceptableFraction(
float x
)
เศษส่วนของบรรทัดที่ต้องการขั้นต่ำก่อนที่จะยอมรับอินพุตที่ถูกตัดทอน
ค่าเริ่มต้นเป็น 1
ช่อง
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::Channels(
int64 x
)
จำนวนช่องสีสำหรับภาพที่ถอดรหัส
ค่าเริ่มต้นเป็น 0
วิธีดีท็อกซ์
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::DctMethod(
StringPiece x
)
สตริงที่ระบุคำใบ้เกี่ยวกับอัลกอริทึมที่ใช้สำหรับการบีบอัด
ค่าเริ่มต้นเป็น "" ซึ่งแมปกับค่าเริ่มต้นเฉพาะระบบ ค่าที่ถูกต้องในปัจจุบันคือ ["INTEGER_FAST", "INTEGER_ACCURATE"] คำใบ้อาจถูกละเว้น (เช่น ไลบรารี jpeg ภายในเปลี่ยนเป็นเวอร์ชันที่ไม่มีตัวเลือกเฉพาะนั้น)
ค่าเริ่มต้นเป็น ""
การเพิ่มสเกลแฟนซี
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::FancyUpscaling(
bool x
)
หากเป็นจริงให้ใช้การลดขนาดของระนาบโครมาที่ช้ากว่าแต่ดีกว่า (yuv420/422 เท่านั้น)
ค่าเริ่มต้นเป็นจริง
อัตราส่วน
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::Ratio(
int64 x
)
อัตราส่วนการลดขนาด
ค่าเริ่มต้นเป็น 1
ลองกู้คืนที่ถูกตัดทอน
TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::TryRecoverTruncated(
bool x
)
หากเป็นจริง ให้ลองกู้คืนรูปภาพจากอินพุตที่ถูกตัดทอน
ค่าเริ่มต้นเป็นเท็จ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::DecodeAndCropJpeg::Attrs Struct Reference\n\ntensorflow::ops::DecodeAndCropJpeg::Attrs\n=========================================\n\n`#include \u003cimage_ops.h\u003e`\n\nOptional attribute setters for [DecodeAndCropJpeg](/versions/r2.1/api_docs/cc/class/tensorflow/ops/decode-and-crop-jpeg#classtensorflow_1_1ops_1_1_decode_and_crop_jpeg).\n\nSummary\n-------\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| [acceptable_fraction_](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1ade4565804d091b2ee9f3f71d7be3ffa2)` = 1.0f` | `float` |\n| [channels_](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1afe18a96df41f5b94c222496dc5206368)` = 0` | `int64` |\n| [dct_method_](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1ab6a1537364211645118c52ac8b3e530e)` = \"\"` | `StringPiece` |\n| [fancy_upscaling_](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a96af21097f175c4dca629887cdb8acf4)` = true` | `bool` |\n| [ratio_](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a09f5eb7adce68e4626c89ab197d0a9ce)` = 1` | `int64` |\n| [try_recover_truncated_](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1ac266a7946265c4dc352d9d70e2259966)` = false` | `bool` |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AcceptableFraction](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a1b5661eb7517d6e8b0d137c216cde926)`(float x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs) The minimum required fraction of lines before a truncated input is accepted. |\n| [Channels](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a9a3c06e5dbbb9e8e7c13b293b2403268)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs) Number of color channels for the decoded image. |\n| [DctMethod](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a8d2f196496c30966160544ad10836e50)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs) string specifying a hint about the algorithm used for decompression. |\n| [FancyUpscaling](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1aee3e9244f85e8b65014b5e036c4f7c0a)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs) If true use a slower but nicer upscaling of the chroma planes (yuv420/422 only). |\n| [Ratio](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1af03f99cbc3529d3f66d2c6c7b443216e)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs) Downscaling ratio. |\n| [TryRecoverTruncated](#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs_1a34f9a484aaa2188fc26ac919ee441dbd)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/decode-and-crop-jpeg/attrs#structtensorflow_1_1ops_1_1_decode_and_crop_jpeg_1_1_attrs) If true try to recover an image from truncated input. |\n\nPublic attributes\n-----------------\n\n### acceptable_fraction_\n\n```scdoc\nfloat tensorflow::ops::DecodeAndCropJpeg::Attrs::acceptable_fraction_ = 1.0f\n``` \n\n### channels_\n\n```scdoc\nint64 tensorflow::ops::DecodeAndCropJpeg::Attrs::channels_ = 0\n``` \n\n### dct_method_\n\n```scdoc\nStringPiece tensorflow::ops::DecodeAndCropJpeg::Attrs::dct_method_ = \"\"\n``` \n\n### fancy_upscaling_\n\n```scdoc\nbool tensorflow::ops::DecodeAndCropJpeg::Attrs::fancy_upscaling_ = true\n``` \n\n### ratio_\n\n```scdoc\nint64 tensorflow::ops::DecodeAndCropJpeg::Attrs::ratio_ = 1\n``` \n\n### try_recover_truncated_\n\n```scdoc\nbool tensorflow::ops::DecodeAndCropJpeg::Attrs::try_recover_truncated_ = false\n``` \n\nPublic functions\n----------------\n\n### AcceptableFraction\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::AcceptableFraction(\n float x\n)\n``` \nThe minimum required fraction of lines before a truncated input is accepted.\n\nDefaults to 1 \n\n### Channels\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::Channels(\n int64 x\n)\n``` \nNumber of color channels for the decoded image.\n\nDefaults to 0 \n\n### DctMethod\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::DctMethod(\n StringPiece x\n)\n``` \nstring specifying a hint about the algorithm used for decompression.\n\nDefaults to \"\" which maps to a system-specific default. Currently valid values are \\[\"INTEGER_FAST\", \"INTEGER_ACCURATE\"\\]. The hint may be ignored (e.g., the internal jpeg library changes to a version that does not have that specific option.)\n\nDefaults to \"\" \n\n### FancyUpscaling\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::FancyUpscaling(\n bool x\n)\n``` \nIf true use a slower but nicer upscaling of the chroma planes (yuv420/422 only).\n\nDefaults to true \n\n### Ratio\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::Ratio(\n int64 x\n)\n``` \nDownscaling ratio.\n\nDefaults to 1 \n\n### TryRecoverTruncated\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeAndCropJpeg::Attrs::TryRecoverTruncated(\n bool x\n)\n``` \nIf true try to recover an image from truncated input.\n\nDefaults to false"]]