xiekai-mc / DetailEmbed

DetailEmbed 旨在无缝地将较小的局部图像嵌入到的低分辨率的完整图像中。通过使用高清的局部图像,DetailEmbed 可以增强完整图像的局部清晰度。(Detailembed is a software project that aims to seamlessly embed smaller local images into low-resolution full images. By using high-definition local images, Detailembed can enhance the local clarity of the complete image.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DetailEmbed

DetailEmbed 是一个软件项目,旨在无缝地将较小的局部图像嵌入到的低分辨率的完整图像中。通过使用高清的局部图像,DetailEmbed 可以增强完整图像的局部清晰度。

例子

  • 低分辨率的大图

alt text

  • 高分辨率的局部小图

alt text
alt text

  • 处理后的结果

(带黑边)

alt text

(不带黑边)

alt text

依赖

  • OpenCV (cv2)
  • NumPy (numpy)
  • PyQt5 (for GUI)

用法

GUI

打开主图片

alt text

打开要嵌入的图片

alt text

使用鼠标左键拖动,滚轮调整大小以完全覆盖要主图片对应区域

alt text

点击嵌入按钮后可继续嵌入或保存

alt text

embed_images_to_large_image函数

参数

big_image_path: 大图的路径,要将小图嵌入其中。

small_image_paths: 要嵌入的小图的路径列表。

params: EmbedParams类,用于设置其他参数设置。

输出

该函数返回嵌入了小图的大图。

示例

from src import EmbedParams, embed_images_to_large_image


big_image_path = "images/Low-resolution.png"
small_image_paths = [
    "images/Deformed-high-resolution-partial.png",
    "images/High-resolution-partial2.png",
]
out_image = embed_images_to_large_image(
    big_image_path, small_image_paths, EmbedParams(
        small_edge_cut=0, corrosion=1, use_corner_matching=True)
)

About

DetailEmbed 旨在无缝地将较小的局部图像嵌入到的低分辨率的完整图像中。通过使用高清的局部图像,DetailEmbed 可以增强完整图像的局部清晰度。(Detailembed is a software project that aims to seamlessly embed smaller local images into low-resolution full images. By using high-definition local images, Detailembed can enhance the local clarity of the complete image.)

License:MIT License


Languages

Language:Python 100.0%