Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
#include <image_ops.h>
Trích xuất thông tin hình dạng của hình ảnh được mã hóa JPEG.
Bản tóm tắt
Hoạt động này chỉ phân tích tiêu đề hình ảnh nên nhanh hơn nhiều so với DecodeJpeg .
Lập luận:
- phạm vi: Một đối tượng phạm vi
- nội dung: 0-D. Hình ảnh được mã hóa JPEG.
Thuộc tính tùy chọn (xem Attrs
):
- Output_type: (Tùy chọn) Loại đầu ra của thao tác (int32 hoặc int64). Mặc định là int32.
Trả về:
-
Output
: 1-D. Hình dạng hình ảnh có định dạng [chiều cao, chiều rộng, kênh].
Thuộc tính công khai
Chức năng công cộng
Các hàm tĩnh công khai
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::ExtractJpegShape Class Reference\n\ntensorflow::ops::ExtractJpegShape\n=================================\n\n`#include \u003cimage_ops.h\u003e`\n\nExtract the shape information of a JPEG-encoded image.\n\nSummary\n-------\n\nThis op only parses the image header, so it is much faster than [DecodeJpeg](/versions/r2.2/api_docs/cc/class/tensorflow/ops/decode-jpeg#classtensorflow_1_1ops_1_1_decode_jpeg).\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- contents: 0-D. The JPEG-encoded image.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs#structtensorflow_1_1ops_1_1_extract_jpeg_shape_1_1_attrs)):\n\n- output_type: (Optional) The output type of the operation (int32 or int64). Defaults to int32.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1-D. The image shape with format \\[height, width, channels\\].\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ExtractJpegShape](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a64ffa4ea238d244c52716d482a64aeb4)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` contents)` ||\n| [ExtractJpegShape](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a5c8f40a8498a2351175856f88c12df3b)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` contents, const `[ExtractJpegShape::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs#structtensorflow_1_1ops_1_1_extract_jpeg_shape_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [image_shape](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a119b30980cd88aeb7e800ef248fe0ef9) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a93aaacf0ede8a075a9e7cbaae6ec1851) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1afbd0f7b3f51267da79a8d34265bc3cd3)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a93f3c5b2f3246fb2633916edd1a51b2a)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1aa148b0c56486902349d41f68d956164d)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| [OutputType](#classtensorflow_1_1ops_1_1_extract_jpeg_shape_1a74c981eaa0a2024456fbe7c35c65b01e)`(DataType x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs#structtensorflow_1_1ops_1_1_extract_jpeg_shape_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ExtractJpegShape::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/extract-jpeg-shape/attrs) | Optional attribute setters for [ExtractJpegShape](/versions/r2.2/api_docs/cc/class/tensorflow/ops/extract-jpeg-shape#classtensorflow_1_1ops_1_1_extract_jpeg_shape). |\n\nPublic attributes\n-----------------\n\n### image_shape\n\n```scdoc\n::tensorflow::Output image_shape\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ExtractJpegShape\n\n```gdscript\n ExtractJpegShape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input contents\n)\n``` \n\n### ExtractJpegShape\n\n```gdscript\n ExtractJpegShape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input contents,\n const ExtractJpegShape::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### OutputType\n\n```text\nAttrs OutputType(\n DataType x\n)\n```"]]