ReshapeR
Image reshaping utility for smart scene resizing based on the content-aware Seam-Carving algorithm.
Install / Use
/learn @prog-ai/ReshapeRREADME
ReshapeR
Image reshaping utility for smart scene resizing based on the content-aware SeamCarving algorithm.
<img src="design/reshaper.jpg?raw=true">Details
ReshapeR is based on SeamCarving algorithm and allows one to resize an image in a smart way using content aware least energy seam detection. The algorithm itself takes place in a few phases. First the Energy grid of the image is calculated and a gradient - contrast output image is obtained. Second the least energy vertical or horizontal path through the image is determined. And lastly, the pixels corresponding to that path are removed. This way the most important elements of the image are preserved as well as the general aspect ratio of those elements and a new "condensed" image is obtained.
Example
<img src="design/change.png?raw=true">Demo
<img src="design/demo.gif" alt="demo" width="1200" align="middle"/>Package
- ReshapeR utility
- Image energy printing utility
- Image seams displaying utility
- Test files are located in the test folder
Usage
-
Go to the
ReshapeRfolder. -
Compile
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" ShowSeams.java
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" ShowEnergy.java
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" SeamCarver.java
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" SCUtility.java
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" ResizeDemo.java
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" PrintSeams.java
C:\ReshapeR> javac -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" PrintEnergy.java
- Run using command line options:
C:\ReshapeR> java -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" ShowEnergy /test/chameleon.png
C:\ReshapeR> java -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" ShowSeams /test/chameleon.png
C:\ReshapeR> java -cp "C:\ReshapeR;C:\ReshapeR\lib\algs4.jar" ResizeDemo /test/chameleon.png 100 0
How to Contribute
- Clone repo and create a new branch:
$ git checkout https://github.com/DumitruHanciu/ReshapeR -b new_branch. - Make changes and test
- Submit Pull Request with comprehensive description of changes
License
Related Skills
qqbot-channel
344.4kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
99.9k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
344.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
project-overview
FlightPHP Skeleton Project Instructions This document provides guidelines and best practices for structuring and developing a project using the FlightPHP framework. Instructions for AI Coding A
