pic2ascii | 将图片转换为 ascii 码 - 运行 Pic2Ascii

 by   veryyoung Java Version: Current License: No License

kandi X-RAY | pic2ascii Summary

kandi X-RAY | pic2ascii Summary

pic2ascii is a Java library. pic2ascii has no bugs, it has no vulnerabilities and it has low support. However pic2ascii build file is not available. You can download it from GitHub.

运行 Pic2Ascii.java 的 main 方法,并传入图片的有效路径。.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pic2ascii has a low active ecosystem.
              It has 19 star(s) with 8 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 2 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pic2ascii is current.

            kandi-Quality Quality

              pic2ascii has 0 bugs and 0 code smells.

            kandi-Security Security

              pic2ascii has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              pic2ascii code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              pic2ascii does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              pic2ascii releases are not available. You will need to build from source code and install.
              pic2ascii has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              pic2ascii saves you 18 person hours of effort in developing the same functionality from scratch.
              It has 50 lines of code, 4 functions and 1 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed pic2ascii and discovered the below as its top functions. This is intended to give you an instant insight into pic2ascii implemented functionality, and help decide if they suit your requirements.
            • Prints the formatted string
            • Transforms image
            • Checks to see if a pixel is black
            • Get image from file
            Get all kandi verified functions for this library.

            pic2ascii Key Features

            No Key Features are available at this moment for pic2ascii.

            pic2ascii Examples and Code Snippets

            No Code Snippets are available at this moment for pic2ascii.

            Community Discussions

            QUESTION

            Convert a simple mono drawing image to a 2d text array
            Asked 2020-Jul-31 at 16:12

            I am trying to develop an algorithm that converts simple mono line images ie Maze, to a text 2d array.

            For example, the image below, it would be converted to the following text array.

            ...

            ANSWER

            Answered 2020-Jul-31 at 16:12

            Interseting problem its basically vector form of Image to ASCII art conversion... I managed to do this with this algorithm:

            1. preprocess image

              You gave us JPG which has lossy compresion meaning your image contain much more than just 2 colors. So there are shades and artifacts which will screw things up. So first we must get rid of those by thresholding and recoloring. So we can have 2D BW image (no grayscales)

            2. vectorize

              Your maze is axis aligned so it contains only horizontal and vertical (h,v) lines. So simply scan each line of image find first starting wall pixel then its ending pixel and store somewhere... repeat until whole line is processed and do this for all lines. Again do the same for rows of image. As your image has thick walls ignore lines sorter than thickness threshold and remove adjacent (duplicates) line that are (almost) the same.

            3. get list of possible grid coordinates from h,v lines

              simply make a list of all x and y (separately) coordinates from lines start and end points. Then sort them and remove too close coordinates (duplicates).

              Now the min and max values gives you AABB of your maze and GCD of all the coordinate-lowest coordinate will give you grid size.

            4. align h,v lines to grid

              simply round all start/end points to nearest grid position ...

            5. create text buffer for maze

              AABB along with grid size will give you resolution of your maz in cells so simply create 2D text buffer where each cell has NxN characters. I am using 6x3 cells which looks nice enough (square and with enough space inside).

            6. renmder h,v lines into text

              simply loop through all lines and render - or | instead of pixels... I am using also + if the target position does not contain ' '.

            7. convert 2D text array into wanted text output

              simply copy the lines into single text ... or if you clever enough you can have 1D and 2D at the same memory place with eol encoded between lines.

            Here simple example in C++/VCL I made from the exampe in the link above:

            Source https://stackoverflow.com/questions/63179536

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pic2ascii

            You can download it from GitHub.
            You can use pic2ascii like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the pic2ascii component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/veryyoung/pic2ascii.git

          • CLI

            gh repo clone veryyoung/pic2ascii

          • sshUrl

            git@github.com:veryyoung/pic2ascii.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by veryyoung

            2048

            by veryyoungJava

            crack-capatcha

            by veryyoungJava

            skeleton

            by veryyoungJava

            online-judge

            by veryyoungJava

            hbutapp

            by veryyoungJava