This release is a pre-release and may not be stable for production use.
Quick-Image: A simple image processing toolkit.
Installation
pip install quick-image
Examples
- Basic Usage
from quick_image import *
# quick_download_image(
# pic_url='https://pixnio.com/free-images/2022/07/21/2022-07-21-08-38-18-1350x900.jpg',
# save_path='flower.jpg')
# quick_show_image("flower.jpg")
# quick_show_image_by_grayscale("flower.jpg")
# quick_show_image_by_grayscale2("flower.jpg")
# quick_show_image_gray("flower.jpg")
# quick_convert_12bit_gray("flower.jpg","flower_12bit.jpg")
# quick_show_canny("flower.jpg")
# quick_replace_image_color("flower.jpg",show=True)
# quick_save_edges("flower.jpg","flower_edges.jpg",t=50)
# quick_filter_by_dist("flower.jpg",max_dist=1000)
'''
list_points,list_colors=quick_pick_image_color("flower.jpg","points.csv" ,"colors.csv")
print(list_points)
print(list_colors)
'''
# quick_remove_pix_color("flower.jpg",target_color= [203,152,125],save_path='flower_removed_color.jpg')
quick_remove_pix_color_by_range("flower.jpg",lower_color= np.array([100, 150, 0]),
upper_color=np.array([140, 255, 255]),show=True)
- Remove noise
from quick_image import *
from quick_image.quick_image_similarity_measures import *
quick_remove_noise1(image_path="flower.jpg",save_path="test4/output1.jpg")
# quick_remove_noise2(image_path="flower.jpg",save_path="test4/output2.jpg",min_size=5)
score_ssim = ssim('flower.jpg', 'test4/output1.jpg')
score_dvsim = dvsim('flower.jpg', 'test4/output1.jpg')
print(score_ssim)
print(score_dvsim)
- Estimate color similarity
from quick_image import *
from skimage import io
'''
find image color similarity
'''
# Example 1:
img_rgb = io.imread('flower.jpg')
green = [203,152,125]
s=get_pct_color(img_rgb, green, 10)
print("s=",s)
# Example 2:
base=[35,103,239]
test_color=[153,0,0]
test_color1=[0,128,255]
print(quick_color_similarity(base,test_color))
print(quick_color_similarity(base,test_color1))
- Edge detection
from quick_image.quick_image_processing import *
import time
time_cost={}
if __name__=="__main__":
image_path="flower.jpg"
# coords = load_polygon_file(f'datasets/areas/{gender}/{body_part}_polygon_area.pickle')
file_name="flower.jpg"
start=time.time()
# Using Canny algorithm (86)
detect_edges(img_path=image_path,save_path='test3_output/'+file_name)
time1=time.time()
# Using Canny algorithm with polygons
detect_edges_with_polygon(img_path=image_path, save_path='test3_output/' + file_name)
time2=time.time()
# Using single-color isolate algorithm
isolate_image(image_path=image_path,save_path='test3_output/'+file_name)
time3=time.time()
# Using multi-color isolate algorithm
isolate_image2(image_path=image_path, save_main_color='test3_output/' + file_name,
save_path='test3_output/' + file_name)
time4=time.time()
time_cost["canny"]=time1-start
time_cost["canny_polygon"]=time2-time1
time_cost["isolate1"]=time3-time2
time_cost["isolate2"]=time4-time3
print("Method\tTime cost")
for k in time_cost:
print(f"{k}\t{round(time_cost[k],4)}")
License
The quick-image toolkit is provided by Donghua Chen with MIT License.
Metadata
Release files for quick-image 0.0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quick-image-0.0.1a0.tar.gz | 22.2 kB | Without provenance | Details for quick-image-0.0.1a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quick_image-0.0.1a0-py3-none-any.whl | Python 3 | none | any | Details for quick_image-0.0.1a0-py3-none-any.whl |
Total release size: 44.2 kB
Release files / quick-image-0.0.1a0.tar.gz
| Download URL | quick-image-0.0.1a0.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87f43065a25c757dab767a15c8f5f63aafccd1c54a352a77b0745a09a76f12b0
|
|
BLAKE2b-256 checksum How to use checksums |
8a85bcf42e3d5c422ca9885b16a8d6e589c7f9bf3d438525488c61973dbaf73d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Release files / quick_image-0.0.1a0-py3-none-any.whl
| Download URL | quick_image-0.0.1a0-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85c32c953316f49535cae2ffb5bcea8760ac4c484aa17f5a8b1da0c708379dce
|
|
BLAKE2b-256 checksum How to use checksums |
e0d46c98dc885dd969e656993289953d3b14aa3fd09a4186827672b73edb99ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Security for quick-image 0.0.1a0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.