• 大小: 2.07MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-13
  • 语言: 其他
  • 标签: 西电  实验  

资源简介

实验目标是编写一个图像滤波函数,并用它基于Oliva、Torralba和Schyns在SIGGRAPH 2006发表的题为“Hybrid images”的论文的简化版本创建混合图像。混合图像是静态图像,其解释随着观看距离的变化而变化。其基本思想是,高频往往在感知中占主导地位,但在远处,只能看到信号的低频(平滑)部分。通过将一幅图像的高频部分与另一幅图像的低频部分混合,可以得到一幅混合图像,在不同的距离产生不同的解释。你将使用你自己的解决方案来创建你自己的混合图像。

资源截图

代码片段和文件信息

import Tkinter as tk
import argparse
import sys
sys.path.append(‘/Users/kb/bin/opencv-3.1.0/build/lib/‘)
import cv2
import hybrid
import json
import numpy as np
import os
sys.path.append(‘./pyuiutils/‘)
import pyuiutils.uiutils as uiutils
import tkFileDialog
import threading
import ttk


class ImageAlignmentframe(uiutils.baseframe):
    def __init__(self parent root template_file=None):
        uiutils.baseframe.__init__(self parent root 4 5)
        tk.Button(self
                  text=‘Load First Image‘
                  command=self.load_first).grid(row=0
                                                column=0
                                                sticky=tk.W + tk.E)
        tk.Button(self
                  text=‘Load Second Image‘
                  command=self.load_second).grid(row=0
                                                 column=1
                                                 sticky=tk.W + tk.E)
        tk.Button(self
                  text=‘Undo‘
                  command=self.undo).grid(row=0
                                          column=2
                                          sticky=tk.W + tk.E)
        tk.Button(self
                  text=‘Redo‘
                  command=self.redo).grid(row=0
                                          column=3
                                          sticky=tk.W + tk.E)
        tk.Button(self
                  text=‘View Hybrid‘
                  command=self.process_compute).grid(row=0
                                                     column=4
                                                     sticky=tk.W + tk.E)
        tk.Button(self
                  text=‘Save Correspondances‘
                  command=self.save_corr).grid(row=1
                                               column=0
                                               sticky=tk.W + tk.E)
        tk.Button(self
                  text=‘Load Correspondances‘
                  command=self.load_corr).grid(row=1
                                               column=1
                                               sticky=tk.W + tk.E)

        self.left_image_widget = uiutils.ClickableImageWidget(self)
        self.left_image_widget.grid(row=2
                                    column=0
                                    columnspan=2
                                    sticky=tk.NSEW)
        self.right_image_widget = uiutils.ClickableImageWidget(self)
        self.right_image_widget.grid(row=2
                                     column=3
                                     columnspan=2
                                     sticky=tk.NSEW)
        self.left_image_name = None
        self.right_image_name = None
        self.left_redo_queue = []
        self.right_redo_queue = []
        self.grid_rowconfigure(2 weight=1)
        self.image_receiver = None
        if template_file is not None:

            def load_template_and_compute():
                self.load

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-09-12 12:10  Exp1_Hybrid_Images\
     目录           0  2019-09-12 12:11  Exp1_Hybrid_Images\.idea\
     文件         408  2019-09-10 22:58  Exp1_Hybrid_Images\.idea\Exp1_Hybrid_Images.iml
     文件         199  2019-09-10 22:50  Exp1_Hybrid_Images\.idea\misc.xml
     文件         295  2019-09-10 22:50  Exp1_Hybrid_Images\.idea\modules.xml
     文件       18704  2019-09-12 12:11  Exp1_Hybrid_Images\.idea\workspace.xml
     文件      576271  2018-09-07 10:19  Exp1_Hybrid_Images\Hybrid images.pdf
     目录           0  2019-09-12 12:06  Exp1_Hybrid_Images\__pycache__\
     文件        5790  2019-09-12 12:06  Exp1_Hybrid_Images\__pycache__\hybrid.cpython-37.pyc
     文件       18627  2018-10-14 17:29  Exp1_Hybrid_Images\gui.py
     文件       18813  2019-09-11 20:26  Exp1_Hybrid_Images\gui3.py
     文件      108530  2019-09-11 23:17  Exp1_Hybrid_Images\hybrid.jpg
     文件        8572  2019-09-12 12:10  Exp1_Hybrid_Images\hybrid.py
     文件       24747  2019-09-11 23:17  Exp1_Hybrid_Images\left.jpg
     文件       25170  2019-09-11 23:17  Exp1_Hybrid_Images\lright.jpg
     目录           0  2019-09-11 20:07  Exp1_Hybrid_Images\pyuiutils\
     文件         702  2018-05-21 15:06  Exp1_Hybrid_Images\pyuiutils\.gitignore
     文件        7652  2018-05-21 15:06  Exp1_Hybrid_Images\pyuiutils\LICENSE
     文件         113  2018-05-21 15:06  Exp1_Hybrid_Images\pyuiutils\README.md
     文件           0  2018-05-21 15:06  Exp1_Hybrid_Images\pyuiutils\__init__.py
     目录           0  2019-09-11 20:07  Exp1_Hybrid_Images\pyuiutils\__pycache__\
     文件         167  2019-09-11 20:07  Exp1_Hybrid_Images\pyuiutils\__pycache__\__init__.cpython-37.pyc
     文件       14517  2019-09-11 20:07  Exp1_Hybrid_Images\pyuiutils\__pycache__\uiutils3.cpython-37.pyc
     文件       14438  2018-10-14 20:17  Exp1_Hybrid_Images\pyuiutils\uiutils.py
     文件       14461  2018-10-14 20:17  Exp1_Hybrid_Images\pyuiutils\uiutils3.py
     目录           0  2019-09-11 22:48  Exp1_Hybrid_Images\resources\
     文件       85364  2018-05-21 15:06  Exp1_Hybrid_Images\resources\cat.jpg
     文件      403109  2019-09-11 21:28  Exp1_Hybrid_Images\resources\cat.png
     文件       89440  2018-05-21 15:06  Exp1_Hybrid_Images\resources\dog.jpg
     文件      380850  2019-09-11 21:29  Exp1_Hybrid_Images\resources\dog.png
     文件      277405  2018-05-21 15:06  Exp1_Hybrid_Images\resources\hybrid.png
............此处省略4个文件信息

评论

共有 条评论