C/Python混合编程下高质量信息隐藏研究与实现
Research and Implementation of High Quality Information Hiding in C/Python Mixed Programming
DOI: 10.12677/airr.2026.151008, PDF,    科研立项经费支持
作者: 陈子超, 丁海洋*, 陈帅龙:北京印刷学院信息工程学院,北京
关键词: 变换域信息隐藏DFTCtypes人类视觉系统Transform Domain Information Hiding DFT Ctypes Human Visual System
摘要: C++在处理信息隐藏算法时具有高效的内存管理和快速执行速度,而Python则在数据处理和脚本编写方面表现出极高的易用性和灵活性。为了融合二者的优势,平衡计算性能与开发效率,本文提出了一种基于Ctypes技术的C/Python混合编程下高质量信息隐藏方案。该方案的核心贡献在于实现方式的创新:首先利用C++语言设计并实现了基于离散傅里叶变换(DFT)的信息隐藏算法,并引入基于人类视觉系统(HVS)模型的自适应嵌入策略增强其性能,然后将其编译为高效率、可移植的动态链接库(DLL);随后,借助Ctypes技术将DLL文件与Python程序深度融合,成功实现了在彩色图像上信息隐藏的精准嵌入与高效提取。本方法不仅验证了将C++编写的高性能信息隐藏算法移植到Python平台的可行性,而且在嵌入的鲁棒性、提取的准确性和算法运行效率等方面均展现出较好性能。这为信息隐藏技术在不同编程环境中的灵活应用提供了一种高效、可靠的解决方案。
Abstract: Processing information hiding algorithms, C++ has efficient memory management and fast execution speed, while Python shows high ease of use and flexibility in data processing and scripting. In order to integrate the advantages of the two and balance the computing performance and development efficiency, this paper proposes a high-quality information hiding scheme based on Ctypes technology in C/Python mixed programming. The core contribution of the scheme lies in the innovation of the implementation method: firstly, the information hiding algorithm based on discrete Fourier transform (DFT) is designed and implemented by using C++ language, and the adaptive embedding strategy based on human visual system (HVS) model is introduced to enhance its performance, and then it is compiled into an efficient and portable dynamic link library (DLL); Subsequently, with the help of ctypes technology, DLL files and python programs are deeply integrated, and the accurate embedding and efficient extraction of information hiding on color images are successfully realized. This method not only verifies the feasibility of transplanting the high-performance information hiding algorithm written in C++ to the Python platform, but also shows good performance in the robustness of embedding, the accuracy of extraction and the efficiency of the algorithm. This provides an efficient and reliable solution for the flexible application of information hiding technology in different programming environments.
文章引用:陈子超, 丁海洋, 陈帅龙. C/Python混合编程下高质量信息隐藏研究与实现[J]. 人工智能与机器人研究, 2026, 15(1): 65-77. https://doi.org/10.12677/airr.2026.151008

参考文献

[1] Podilchuk, C.I. and Delp, E.J. (2001) Digital Watermarking: Algorithms and Applications. IEEE Signal Processing Magazine, 18, 33-46. [Google Scholar] [CrossRef
[2] Samtani, R. (2009) Ongoing Innovation in Digital Watermarking. Computer, 42, 92-94. [Google Scholar] [CrossRef
[3] Ma, Y., Wang, S., Song, J., Yu, Y., Sun, W. and Bian, J. (2020) Comparative and Analysis of Spatial Domain and Frequency Domain Digital Image Watermarking Algorithm. Journal of Physics: Conference Series, 1486, Article 032026. [Google Scholar] [CrossRef
[4] 眭新光. 文本信息隐藏及分析技术研究[D]: [博士学位论文]. 郑州: 解放军信息工程大学, 2007.
[5] 轩璐, 鲁晓辉. 一种基于空域均值的图像信息隐藏算法[J]. 长江信息通信, 2022, 35(9): 24-26.
[6] 轩璐. 一种基于关系的空域信息隐藏算法[J]. 电脑编程技巧与维护, 2022(7): 141-143+176.
[7] 丁海洋. 基于DCT和DFT视频盲信息隐藏算法的研究与实现[J]. 北京印刷学院学报, 2012, 20(4): 32-35.
[8] 刘旭. 基于小波变换的数字水印隐藏与检测算法设计[J]. 西安文理学院学报自然科学版), 2018, 21(4): 42-44+72.
[9] 张华宇, 汪国强. 基于DWT的数字视频信息隐藏算法[J]. 科技创新导报, 2018, 15(33): 100+102.
[10] 王先春, 郭杰荣, 胡惟文, 等. 基于DCT和DWT域的音频信息隐藏算法[J]. 计算机工程与设计, 2008(16): 4389-4391.
[11] 王海文, 李杰, 王鸿林, 等. 基于二维离散余弦变换的图像信息隐藏算法研究[J]. 印刷与数字媒体技术研究, 2023(3): 119-124.
[12] 许静. 一种基于YUV空间的DCT彩色图像信息隐藏算法[J]. 科技信息(学术研究), 2007(30): 415-416.
[13] 王树梅, 张文斌. 一种基于傅里叶变换的鲁棒信息隐藏算法[J]. 湖南理工学院学报(自然科学版), 2019, 32(3): 17-22.
[14] 杨烨, 孙容海, 施林甫, 等. 面向大文件的多载体图像信息隐藏方法[J]. 信息技术, 2018(5): 52-54.
[15] 陈欣欣, 玄宇, 牟歌, 等. 基于变换域的信息隐藏技术[J]. 科技创新与应用, 2014(35): 55.
[16] Guy, K.K. (2008) Automatic C Library Wrapping—Ctypes from the Trenches. Python Papers, 3, 1-7.
[17] 秦定武, 丁海洋, 张凡, 等. 基于Android的变换域数字图像信息隐藏算法[J]. 通信技术, 2023, 56(1): 119-125.
[18] 许勇, 李佩佩. 基于Android系统视频信息隐藏算法的研究[J]. 信息技术, 2016(10): 113-116.
[19] Yegulalp, S. (2016) PyPy Update Makes Nice with Python C Extensions. InfoWorld, 2, 18-23.
[20] Alex, H. (2008) Ctypes. Ctypes Run! Python Papers, 2, 38-43.