Imaging
vyntek/imaging.hpp · 便利伞头(CM1)→ 嵌套 <vyntek/imaging/…> · NON-STABLE / STUB
权威规格(www):image-model · memory-management · camera-acquisition · session-lifecycle · TC-MEM · TC-ACQ · cpp-headers 本仓对齐。
优先
#include <vyntek/imaging/handle.hpp>等嵌套路径。扁平imaging.hpp仅为便利转发。
头文件 → 关键公开符号(按实)
| 头 | 关键公开符号 | 状态 |
|---|---|---|
imaging/image_info.hpp | PixelFormat(Gray8 / Rgb24 / Bgr24 / Depth16)· ColorEncoding(Unspecified / Srgb / LinearRgb)· ImageInfo:构造(宽/高/格式/row_step_bytes/start_offset_bytes)· width / height / pixel_format / color_encoding / row_step_bytes / start_offset_bytes · pixel_bytes_per_row / pixel_byte_count · set_color_encoding · 公有字段 image_id / captured_at / origin_x / origin_y / depth_unit_meters / invalid_depth_value(均 optional)· ValidateCapacity(越界抛 invalid_argument)· GetRegion(ROI,越界抛) | 声明在 |
imaging/version.hpp | BufferId(u64)· ImageContentVersion(buffer_id + generation;valid()) | generation 由 CompleteWriter 每次发布递增;OpenRead/OpenWrite 校验 VersionMismatch;验收未齐 |
imaging/status.hpp | Status 闭集 9 值:Ok / NotSupported / Disposed / InvalidOperation / Cancelled / NotImplemented / VersionMismatch / InvalidArgument / Invalid · CancelToken · OpenResult<T>(status / value / expected_version / actual_version;Success / Failure / FailureVersionMismatch 工厂;operator bool / * / ->) | 外形在 |
imaging/buffer.hpp | BufferAccess(ReadOnly / ReadWrite)· BufferInitialization(Uninitialized / Initialized)· BufferReturnState(Active / Returning / Returned / ReturnFailed)· ImageBuffer:Rent / TryRent(M4-03 原子预留)/ CanRent(非预留查询)· TakeOwnership(MemoryOwner 与 unique_ptr<uint8_t[]> 两重载;成功才接管)· ImportNative(裸指针旧重载 + 带 release 回调新重载)· Share · OpenRead / OpenWrite(可带 expected version)· AwaitReturnCompleted / ReturnCompleted · data / capacity / buffer_id / access / return_state / retained_byte_length · ImageBufferPin(address / capacity / access / buffer_id;Make)· ImagePixelReader / ImagePixelWriter(buffer 级薄 grant;version() / access_id() / Complete() / close()) | 池参数在;ReturnCompleted cpp 有实现;仍 NON-STABLE |
imaging/memory_pool.hpp | MemoryPool 虚基类:Allocate / Deallocate / CanRent(默认乐观 bytes > 0)/ WouldSucceed(signoff 别名)· DefaultMemoryPool() | 虚基类;Reed 拥有真实池 |
imaging/memory_owner.hpp | MemoryOwner 虚基类(data / capacity / retained_byte_length 默认 = capacity)· ByteArrayMemoryOwner(unique_ptr<uint8_t[]> 适配器) | 交给 TakeOwnership |
imaging/access.hpp | ReadOnlyViewBase:GetPixelBytes · Share / ShareImage · Pin · ShareBuffer(TC-MEM-09 keepalive:仅保活分配、不延长 grant、不开写) · close()(幂等 ReleaseReader)· version() · WritableViewBase:GetPixelBytes · Pin · Complete / CompleteAndOpenRead · close()(未 Complete 则 AbortWriter)· completed() / buffer_id() / access_id() · ReadOnlyView<TPixel> / WritableView<TPixel>:GetPixelRow | 仍 STUB 成熟度;View 为首选宿主/算法面 |
imaging/handle.hpp | Rgb24 / Bgr24 结构体 · PixelImageHandle:拷贝/移动(引用计数)· operator bool · info / width / height / buffer_id / access / retained_byte_length · Share · GetRegion(ROI 子视图)· Clone(OpenResult)· OpenRead / OpenWrite(可带 expected version)· MakeStub · PixelImageHandleT<TPixel>(Gray8Handle / Rgb24Handle / Bgr24Handle / Depth16Handle) | 外形齐;NON-STABLE |
imaging/factory.hpp | PixelImage(命名空间即结构体):Create(ImageBuffer + ImageInfo)· Copy(拷贝像素;access / pool 可选)· Clone(OpenResult + MemoryPool&)· RentGray8 / RentRgb24 / RentBgr24 / RentDepth16 | 租还经池;包装为类型化句柄 |
imaging/acquisition_session.hpp | AcquisitionState / StopProgress / StopTimeout / StopSummary / StopOutcome / StopFaults / ResourceDiagnosticsSnapshot / ResourceBufferDiag · AcquisitionSession(详见 Session 页)· PostOwnedOrClose | ≠ RunSession |
imaging/fake_camera_adapter.hpp | FakeCameraAdapter(持帧 / 回调 Copy) | 测试假适配器;非供应商适配 |
| (C API 投影) | vyntek_imaging_* 见 capi/vyntek_exports.h:handle_adopt / handle_share / handle_release · handle_info / handle_image_info · create_copy · open_read / view_close · try_get_{gray8,rgb24,bgr24,depth16} · try_get_depth_meters · acq_session_{adopt,release,latest,peek_ingress_front} | 声明在;NON-STABLE |
与过时摘要的纠偏
早期本站曾写「仅有 vyntek::Image 空类」「acquisition_session 空壳」或「Latest() = FIFO 队首」。已作废。Latest() 是预览槽;FIFO 是 PeekIngressFront()。