{"id":22089921,"url":"https://github.com/dhchenx/quick-image","last_synced_at":"2025-10-30T22:17:52.521Z","repository":{"id":58432113,"uuid":"531826267","full_name":"dhchenx/quick-image","owner":"dhchenx","description":"A simple image processing toolkit","archived":false,"fork":false,"pushed_at":"2022-09-02T07:32:13.000Z","size":764,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T06:27:50.524Z","etag":null,"topics":["image-processing","quick-image","quick-image-processing"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/quick-image/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhchenx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-02T07:30:48.000Z","updated_at":"2022-09-02T07:34:25.000Z","dependencies_parsed_at":"2022-09-24T19:04:23.837Z","dependency_job_id":null,"html_url":"https://github.com/dhchenx/quick-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhchenx%2Fquick-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhchenx%2Fquick-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhchenx%2Fquick-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhchenx%2Fquick-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhchenx","download_url":"https://codeload.github.com/dhchenx/quick-image/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245181549,"owners_count":20573718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["image-processing","quick-image","quick-image-processing"],"created_at":"2024-12-01T02:14:43.876Z","updated_at":"2025-10-30T22:17:47.469Z","avatar_url":"https://github.com/dhchenx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Quick-Image: A simple image processing toolkit. \n\n### Installation\n\n```\n    pip install quick-image\n```\n\n## Examples\n\n1. Basic Usage\n\n```python\nfrom quick_image import *\n\n# quick_download_image(\n# pic_url='https://pixnio.com/free-images/2022/07/21/2022-07-21-08-38-18-1350x900.jpg',\n# save_path='flower.jpg')\n\n# quick_show_image(\"flower.jpg\")\n\n# quick_show_image_by_grayscale(\"flower.jpg\")\n\n# quick_show_image_by_grayscale2(\"flower.jpg\")\n\n# quick_show_image_gray(\"flower.jpg\")\n\n# quick_convert_12bit_gray(\"flower.jpg\",\"flower_12bit.jpg\")\n\n# quick_show_canny(\"flower.jpg\")\n\n# quick_replace_image_color(\"flower.jpg\",show=True)\n\n# quick_save_edges(\"flower.jpg\",\"flower_edges.jpg\",t=50)\n\n# quick_filter_by_dist(\"flower.jpg\",max_dist=1000)\n\n'''\nlist_points,list_colors=quick_pick_image_color(\"flower.jpg\",\"points.csv\" ,\"colors.csv\")\nprint(list_points)\nprint(list_colors)\n'''\n\n# quick_remove_pix_color(\"flower.jpg\",target_color= [203,152,125],save_path='flower_removed_color.jpg')\n\nquick_remove_pix_color_by_range(\"flower.jpg\",lower_color= np.array([100, 150, 0]),\n                                upper_color=np.array([140, 255, 255]),show=True)\n\n```\n\n2. Remove noise\n\n```python\n\nfrom quick_image import *\nfrom quick_image.quick_image_similarity_measures import *\n\nquick_remove_noise1(image_path=\"flower.jpg\",save_path=\"test4/output1.jpg\")\n\n# quick_remove_noise2(image_path=\"flower.jpg\",save_path=\"test4/output2.jpg\",min_size=5)\nscore_ssim = ssim('flower.jpg', 'test4/output1.jpg')\nscore_dvsim = dvsim('flower.jpg', 'test4/output1.jpg')\nprint(score_ssim)\nprint(score_dvsim)\n\n```\n\n3. Estimate color similarity\n```python\nfrom quick_image import *\nfrom skimage import io\n'''\n    find image color similarity\n'''\n# Example 1:\nimg_rgb = io.imread('flower.jpg')\ngreen = [203,152,125]\ns=get_pct_color(img_rgb, green, 10)\nprint(\"s=\",s)\n\n# Example 2:\nbase=[35,103,239]\ntest_color=[153,0,0]\ntest_color1=[0,128,255]\n\nprint(quick_color_similarity(base,test_color))\nprint(quick_color_similarity(base,test_color1))\n```\n\n4. Edge detection\n\n```python\nfrom quick_image.quick_image_processing import *\nimport time\ntime_cost={}\nif __name__==\"__main__\":\n    image_path=\"flower.jpg\"\n\n    # coords = load_polygon_file(f'datasets/areas/{gender}/{body_part}_polygon_area.pickle')\n    file_name=\"flower.jpg\"\n\n    start=time.time()\n    # Using Canny algorithm (86)\n    detect_edges(img_path=image_path,save_path='test3_output/'+file_name)\n    time1=time.time()\n    # Using Canny algorithm with polygons\n    detect_edges_with_polygon(img_path=image_path, save_path='test3_output/' + file_name)\n    time2=time.time()\n    # Using single-color isolate algorithm\n    isolate_image(image_path=image_path,save_path='test3_output/'+file_name)\n    time3=time.time()\n    # Using multi-color isolate algorithm\n    isolate_image2(image_path=image_path, save_main_color='test3_output/' + file_name, \n                   save_path='test3_output/' + file_name)\n    time4=time.time()\n    time_cost[\"canny\"]=time1-start\n    time_cost[\"canny_polygon\"]=time2-time1\n    time_cost[\"isolate1\"]=time3-time2\n    time_cost[\"isolate2\"]=time4-time3\n    print(\"Method\\tTime cost\")\n    for k in time_cost:\n        print(f\"{k}\\t{round(time_cost[k],4)}\")\n\n```\n\n### License\n\nThe `quick-image` toolkit is provided by [Donghua Chen](https://github.com/dhchenx) with MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhchenx%2Fquick-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhchenx%2Fquick-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhchenx%2Fquick-image/lists"}