{"id":20392770,"url":"https://github.com/g3th/pixel_energy","last_synced_at":"2026-06-08T05:32:14.939Z","repository":{"id":199824734,"uuid":"703830139","full_name":"g3th/Pixel_Energy","owner":"g3th","description":"Calculating pixel Energy and Intensity for an entire image in Kotlin, using Java's standard image libraries","archived":false,"fork":false,"pushed_at":"2023-10-13T02:20:13.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T00:27:42.266Z","etag":null,"topics":["command-line","command-line-arguments","image-processing","imageio","java-awt","kotlin","pixel-energy","pixel-intensity","seam-carving"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/g3th.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-12T02:23:55.000Z","updated_at":"2023-10-12T02:27:09.000Z","dependencies_parsed_at":"2023-12-15T09:30:21.199Z","dependency_job_id":null,"html_url":"https://github.com/g3th/Pixel_Energy","commit_stats":null,"previous_names":["g3th/pixel_energy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/g3th/Pixel_Energy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FPixel_Energy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FPixel_Energy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FPixel_Energy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FPixel_Energy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g3th","download_url":"https://codeload.github.com/g3th/Pixel_Energy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g3th%2FPixel_Energy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34050224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","command-line-arguments","image-processing","imageio","java-awt","kotlin","pixel-energy","pixel-intensity","seam-carving"],"created_at":"2024-11-15T03:45:34.604Z","updated_at":"2026-06-08T05:32:14.922Z","avatar_url":"https://github.com/g3th.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calculating Pixel Intensity\n## Pixel Energy and Intensity Calculation\n### Input original image and output the image after function calculation\n\n\nIn order to calculate the energy and intensity values of each pixel in an image, each pixel's RGB value must be calculated separately with an algorithm/function originally developed by Shai Avidan and Ariel Shamir. \n\nBy energy, one means determining the importance of pixels with a mathematical function, values which will be used when resizing an image with the Seam Carving algorithm.\n\nThe dual-gradient energy function is:\n\n\u003cimg src='assets/1.png' width=60%\u003e\n\nThe square of x is calculated by:\n\n\u003cimg src='assets/2.png' width=60%\u003e\n\nand y is:\n\n\u003cimg src='assets/3.png' width=60%\u003e\n\nBorders are calculated with:\n\n\u003cimg src='assets/4.png' width=60%\u003e\n\nFor instance, if x = 0 and y = 0, \"left\" would be x, \"right\" would be x + 2, \"up\" would be y and \"down\" would be y + 2. Everything should be calculated with Double precision, until the final calculation for pixel intensity:\n\n``` I = (255.0 * energy / maxEnergy).toInt()```\n\nwhere \"maxEnergy\" is the largest Energy value in the entire image. \n\nThe project uses javax.ImageIO and java.awt libraries, using methods such as \"Color\" in order to return an RGB value which can then easily be converted to individual Red - Green and Blue values. This simplifies matters greatly, but the project is still fairly complicated.\n\nCompile with:\n\n```kotlinc main.kt conditionals.kt -include-runtime -d test.jar```\n\nRun with command line arguments, i.e.:\n\n```java -jar test.jar -in ~/Desktop/test.png -out test-energy.png```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg3th%2Fpixel_energy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg3th%2Fpixel_energy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg3th%2Fpixel_energy/lists"}