Coder Social home page Coder Social logo

shaunhwq / visual_comparison Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 1.0 32.33 MB

A comparison tool to aid image/video enhancement research

License: MIT License

Python 100.00%
image-comparison video-comparison computer-vision image-enhancement video-enhancement image-denoising super-resolution video-denoising video-super-resolution low-light-image-enhancement

visual_comparison's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pannavicb

visual_comparison's Issues

Tkinter auto scale?

Is tkinter able to handle the automatic scaling? If so could we remove the frame interpolation method we use in the display widget.

Windows right mouse button is not <Button-2>

Unable to reset zoom when using windows.
Check all keybindings to ensure correctness on windows and mac.
Might want to add separate class for keyboard bindings, which inherit from some base keybinding class

File filtering bug with sorting

Number sorting is treated as text and is not sorted properly

possible solution is to call .sort() with key casting to data type.

Code clean up

Can separate UI elements and app functionality.

Callbacks can be connected to the functions in the UI elements later

Add zoom feature

Perhaps we could add a feature for zooming in to the image

Move mouse to show different part of image. Maybe something like this:
image

Consistent text size for title in each image

When image size changes, the text becomes larger/smaller, hard to see.

A consistent font size for all images with scale of 1 = width of image for X number of characters is better.

Video recording feature

Video recording to show comparison results

  1. ctrl/cmd + r or button click to begin recording
  2. Prompt user to select save dir or save in some default dir
  3. open cv2 video writer obj and write
  4. Upon img size change, terminate recording since we need to set a fixed frame size
  5. every run of display loop, write display frame to obj. Draw red dot or change the recording button color to indicate that it is recording.

Raise error when root folder with files

Ref:
visual_comparison/utils/file_utils.py", line 38, in get_filenames
file_paths = [os.path.splitext(file_path)[0] for file_path in os.listdir(folder_path) if file_path[0] != "."]

Raise error when root folder with '.mp4' files or any other extensions,

Optimize program when switching using 'a' or 'd'

Currently we need to initialize all caps when changing index which leads to slow performance when 'a' or 'd' is held.

Optimization ideas:

  1. When button is held, only show preview.
  2. Set a timer, which is reset when button is held. Upon timer expired call display function

Shift window when changing to concat mode

If there are too many methods and we change to concat mode, shown images might appear out of the screen.

Should shift window such that all images can be seen (shift to the middle)

Let users choose folder to load using GUI

Currently using --root to specify directory to compare.

We could add a button to allow users to change the directory using a button instead.

Possible workflow:

  1. Click button
  2. Popup appears, type in path or use file explorer prompt to specify dir
  3. Reload all content

Key bindings for switching between different methods

Similar to 1-9 keybindings but using 2 keys only

e.g. k & l for switching 'left' & 'right',
method idx = 5
press k 4 times, switch from 5 to 4, 3, 2, 1
Press l 2 times, switch from 1, to 2, 3

Useful for strength comparisons, can easily flash between same method different strength

Video slider out of sync when setting cap

When video slider is clicked, we set cap to value / 100 * first_video_cap.get(cv2.CAP_PROP_FRAME_COUNT) for all videos.
Video after that is out of sync. Appears to be a cv2 issue.

However, when video is playing normally there is no sync issue.

Progress bar for file loading

Show a progressbar when loading files to update users on current status

Add a progressbar widget or use customtkinter's

Settings window

Let users customize settings for the application.
Can use a configuration file to persist the desired settings, write upon confirm.

Might want to consider using Ctk's option menu.

Add message boxes

User should not have to refer to command line to see if there is a problem or anything that requires their attention

Create a message box that closes on its own

File filtering and sorting

Add new feature to filter and sort files.

tksheet and tkintertable packages are very hard to use, try out ttk.TreeView instead

Add a side column to display added filters and add feature to remove filters

Loss of detail for .tif images

Might be saved in .tif, in value range [0,65535]. Image reading squeezes it to int [0,255]. Perhaps best to squeeze everything to float [0,1].

Better video controls

Could add better controls to handle video playback, such as those from commonly used video players.

  1. Pause/play button
  2. +1/-1 frame
  3. Skip to specific frame (type in)
  4. Seeker preview. When clicking on seeking button, show small frame? similar to youtube
  5. Video preview. Load video I-frames and have a slider to display them. On click jump to part in video.
  6. x1.5 x2 playback etc

Add option to turn off screen resize

Screen is resized when comparison image size is larger than screen resolution. This might introduce aliasing effects in the resized image which is not desirable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.