Comments (16)
Now it should work also when percentage is used. Right now I'm working on some updates to facilitate the GUI debugging. Once it's done and the GUI debug mode is enabled it will be much easier for everyone to get a real sense how the algorithm is working.
from caire.
What I can see at a first sight is that the source image and the mask image has two different size. The mask image should have exactly the same size as the source image to work properly. The logic behind is identical with the face detection: I'm just making some XOR operations with the image mask and the sobel operator, in other words the zones which have more white patches are not altered by the seam carver.
from caire.
Sorry I had uploaded the wrong image. This is the correct mask image I had used
The output is same as before
from caire.
Looks like that for vertical resizing something is not working quite well. For horizontal resize this is what I got using the following command:
$ caire -in testdata/sample.jpg -out output.jpg -perc=1 -width=50 -mask "mask.jpg" -debug=1
from caire.
This is decent output. Is there any workaround to make it work for vertical resizing as well? I need the solution for both horizontal and vertical resizing. Seems like the algorithm is not considering the top pixels for this image, those top pixels(vertical), seem very similar to the horizontal ones (at least visually). So not sure whats going wrong
from caire.
I'll have to debug it. Sure it should work both for horizontal and vertical resizing equally.
from caire.
Thank you @esimov.
from caire.
This issue should be fixed now. You should pull out the new code changes. Let me know if it's working for you.
from caire.
I pulled the latest code and ran it again, but still seeing the same output.
I am using the following commands to run the algorithm:
1.) cd cmd/caire
2.) go build main.go
3.) go run main.go -in example.jpg -out output.jpg -width=500 -height=300 -mask sal_example.jpg
Please let me know if I am doing something wrong here
from caire.
I have completely rewritten a few parts of the seam carver algorithm. There were a few things which didn't worked properly on vertical resizing, so normally the issue should be fixed now.
from caire.
I tried the latest code. There still seems to be distortion in the masked objects (sometimes moderate, sometimes severe). Also, it seems a lot of times algorithm just ignores the background leaves to carve out.
go run main.go -in example.jpg -out output.jpg -width=500 -height=300 -mask sal_example.jpg
go run main.go -in example.jpg --perc=1 -out output.jpg -height=10 -width=50 -mask sal_example.jpg
from caire.
I can confirm that the last example is not working as expected. I will check it soon.
from caire.
Thank you @esimov. Will look forward to the solution
from caire.
I closed this by mistake. Reopening it
from caire.
If you don't have any objections I would close this ticket.
from caire.
Since I didn't get any response I will close this ticket.
from caire.
Related Issues (20)
- Support masks HOT 4
- Index out of range when using a blur radius value >= 255 HOT 1
- Preview resizing process HOT 1
- Seams left over on preview debug mode HOT 1
- error while loading shared libraries: libEGL.so.1 (installed caire using snap) HOT 8
- Image enlargement does not produce good quality output HOT 1
- Enlarging an image with face detect panics HOT 10
- https://github.com/muesli/smartcrop HOT 2
- g.ctx.Px undefined (type layout.Context has no field or method Px) HOT 3
- Missing sources on Linux (Ubuntu) - maybe instructions could be updated HOT 12
- Is a tutorial available HOT 2
- Text detection HOT 2
- Preserve Jpeg color profile HOT 6
- Unable to run on ubuntu HOT 2
- Face flag doesnt seem to work HOT 9
- Resize not working properly when both height and width are passed in percentages HOT 2
- Algorithm takes forever to run for this image HOT 1
- Feat: GUI mode debugging option HOT 1
- A CI/CD Observability Solution Suggestion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caire.