-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edge Shading #14
Edge Shading #14
Conversation
…variable charaxter width mode in print_image_no_colors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea and implementation!
I got some more ideas (if you want to implement more):
- An option to suppress non-edge output would be neat, i.e. like an edge-detector.
- Support for different common edge-detection kernels could also be added.
(Also one test (make test
, test ( 9) (width, border)) now fails. If you want you can look into this, otherwise I'll fix that.)
Thanks so much for taking a look :) the test failure was due to accessing outside the image array but should be fixed now. And thanks for the edges only suggestion! it works really nice: For the alternative edge detection kernels, I did try a couple of them but the simple one I have used seemed the best. I think the subsampling of the initial image means that the edge detection is already kind of awkward as edges are blurred out a bit, so to take advantage of different edge kernels it would probably make more sense to apply to kernel before subsampling. Maybe that can be a future feature :) The test script is also very cool, I can add some tests for edge shading if you like? But I guess you might have a better idea of what to add than me. |
Makes sense that other kernels do not look really different for ASCII art. Adding three little test (one with and one without Two little things are still missing:
Also when using This is coming together very nicely ;) |
The man page and autocomplete should be updated now :) and I also added a commit to prevent a space being added when you autocomplete an option that ends in = Before I do the tests I am just wondering about the behaviour with |
The current behavior for |
Ok perfect, the tests should be there now :) |
Awesome! Unless you want to add something else to this PR it's ready to merge. |
Thanks so much! Sounds good to me, I really enjoyed working on this and learned a lot :) |
Hi, hope this project is still active :) I love jp2a and I had an idea which I think could be cool.
I added a few changes which allow the user to set an
--edge-threshold
. Anywhere that the image gradient is above this value, a directional character like/|\=
is inserted, which can help highlight edges. I think the implementation could maybe be a bit better so any ideas appreciated!Here is a demo, you can see the whiskers kind of get highlighted a bit: