Imageapi
cloudmersive-image-api-client的Python项目详细描述
cloudmersive_image_api_客户端
图像识别和图像处理也可以使用API进行。在
这个Python包为Cloudmersive Image Recognition and Processing提供了一个本机API客户机
- API版本:v1
- 软件包版本:3.0.1
- 生成包:io.swagger.codegen.语言.PythonClientCodegen在
要求
Python 2.7和3.4+
安装和使用
pip安装
如果python包托管在Github上,则可以直接从Github安装
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(您可能需要使用根权限运行pip
:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
然后导入包:
^{pr2}$设置工具
通过Setuptools安装。在
python setup.py install --user
(或sudo python setup.py install
为所有用户安装软件包)
然后导入包:
importcloudmersive_image_api_client
入门
请按照installation procedure操作,然后运行以下命令:
from__future__importprint_functionimporttimeimportcloudmersive_image_api_clientfromcloudmersive_image_api_client.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: Apikeyconfiguration=cloudmersive_image_api_client.Configuration()configuration.api_key['Apikey']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance=cloudmersive_image_api_client.ArtisticApi(cloudmersive_image_api_client.ApiClient(configuration))style='style_example'# str | The style of the painting to apply. To start, try \"udnie\" a painting style. Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".image_file='/path/to/file.txt'# file | Image file to perform the operation on. Common file formats such as PNG, JPEG are supported.try:# Transform an image into an artistic painting automaticallyapi_response=api_instance.artistic_painting(style,image_file)pprint(api_response)exceptApiExceptionase:print("Exception when calling ArtisticApi->artistic_painting: %s\n"%e)
API终结点文档
所有uri都是相对于https://api.cloudmersive.com
Class | Method | HTTP request | Description |
---|---|---|---|
ArtisticApi | artistic_painting | POST /image/artistic/painting/{style} | Transform an image into an artistic painting automatically |
ConvertApi | convert_to_bmp | POST /image/convert/to/bmp | Convert input image to Bitmap BMP format |
ConvertApi | convert_to_gif | POST /image/convert/to/gif | Convert input image to GIF format |
ConvertApi | convert_to_jpg | POST /image/convert/to/jpg/{quality} | Convert input image to JPG, JPEG format |
ConvertApi | convert_to_photoshop | POST /image/convert/to/psd | Convert input image to Photoshop PSD format |
ConvertApi | convert_to_png | POST /image/convert/to/png | Convert input image to PNG format |
ConvertApi | convert_to_tiff | POST /image/convert/to/tiff | Convert input image to TIFF format |
ConvertApi | convert_to_web_p | POST /image/convert/to/webp | Convert input image to WebP format |
EditApi | edit_auto_orient | POST /image/edit/auto-orient/remove-exif | Normalizes image rotation and removes EXIF rotation data |
EditApi | edit_composite_basic | POST /image/edit/composite/{location} | Composite two images together |
EditApi | edit_contrast_adaptive | POST /image/edit/contrast/{gamma}/adaptive | Adaptively adjust the contrast of the image to be more appealing and easy to see |
EditApi | edit_crop_rectangle | POST /image/edit/crop/rectangle/{left}/{top}/{width}/{height} | Crop an image to a rectangular area |
EditApi | edit_draw_polygon | POST /image/edit/draw/polygon | Draw a polygon onto an image |
EditApi | edit_draw_rectangle | POST /image/edit/draw/rectangle | Draw a rectangle onto an image |
EditApi | edit_draw_text | POST /image/edit/draw/text | Draw text onto an image |
EditApi | edit_drop_shadow | POST /image/edit/drop-shadow/{X}/{Y}/{sigma}/{opacity} | Add a customizeable drop shadow to an image |
EditApi | edit_invert | POST /image/edit/invert | Invert, negate the colors in the image |
EditApi | edit_remove_exif_data | POST /image/edit/remove-exif | Remove EXIF data from the image |
EditApi | edit_remove_transparency | POST /image/edit/remove-transparency | Remove transparency from the image |
EditApi | edit_rotate | POST /image/edit/rotate/{degrees}/angle | Rotate an image any number of degrees |
FaceApi | face_compare | POST /image/face/compare-and-match | Compare and match faces |
FaceApi | face_crop_first | POST /image/face/crop/first | Crop image to face with square crop |
FaceApi | face_crop_first_round | POST /image/face/crop/first/round | Crop image to face with round crop |
FaceApi | face_detect_age | POST /image/face/detect-age | Detect the age of people in an image |
FaceApi | face_detect_gender | POST /image/face/detect-gender | Detect the gender of people in an image |
FaceApi | face_locate | POST /image/face/locate | Detect and find faces in an image |
FaceApi | face_locate_with_landmarks | POST /image/face/locate-with-landmarks | Detect and find faces and landmarks eyes and nose and mouth in image |
FilterApi | filter_black_and_white | POST /image/filter/black-and-white | Convert image to black-and-white grayscale |
FilterApi | filter_despeckle | POST /image/filter/despeckle | Despeckle to remove point noise from the image |
FilterApi | filter_edge_detect | POST /image/filter/edge-detect/{radius} | Detect and highlight edges in an image |
FilterApi | filter_emboss | POST /image/filter/emboss/{radius}/{sigma} | Emboss an image |
FilterApi | filter_gaussian_blur | POST /image/filter/blur/guassian/{radius}/{sigma} | Perform a guassian blur on the input image |
FilterApi | filter_motion_blur | POST /image/filter/blur/motion/{radius}/{sigma}/{angle} | Perform a motion blur on the input image |
FilterApi | filter_posterize | POST /image/filter/posterize | Posterize the image by reducing distinct colors |
FilterApi | filter_swirl | POST /image/filter/swirl | Swirl distort the image |
InfoApi | info_get_dominant_color | POST /image/get-info/dominant-color | Returns the dominant colors of the image |
InfoApi | info_get_metadata | POST /image/get-info/metadata | Returns the image metadata including EXIF and resolution |
NsfwApi | nsfw_classify | POST /image/nsfw/classify | Not safe for work NSFW racy content classification |
RecognizeApi | recognize_describe | POST /image/recognize/describe | Describe an image in natural language |
RecognizeApi | recognize_detect_and_unskew_document | POST /image/recognize/detect-document/unskew | Detect and unskew a photo of a document |
RecognizeApi | recognize_detect_objects | POST /image/recognize/detect-objects | Detect objects including types and locations in an image |
RecognizeApi | recognize_detect_people | POST /image/recognize/detect-people | Detect people including locations in an image |
RecognizeApi | recognize_detect_text_fine | POST /image/recognize/detect-text/fine | Detect fine text in a photo of a document |
RecognizeApi | recognize_detect_text_large | POST /image/recognize/detect-text/large | Detect large text in a photo |
RecognizeApi | recognize_detect_vehicle_license_plates | POST /image/recognize/detect-vehicle-license-plates | Detect vehicle license plates in an image |
RecognizeApi | recognize_find_symbol | POST /image/recognize/find/symbol | Find the location of a symbol in an image |
ResizeApi | resize_post | POST /image/resize/preserveAspectRatio/{maxWidth}/{maxHeight} | Resize an image while preserving aspect ratio |
ResizeApi | resize_resize_simple | POST /image/resize/target/{width}/{height} | Resize an image |
模型文档
- AgeDetectionResult
- ColorResult
- DetectedLicensePlate
- DetectedObject
- DominantColorResult
- DrawPolygonInstance
- DrawPolygonRequest
- DrawRectangleInstance
- DrawRectangleRequest
- DrawTextInstance
- DrawTextRequest
- Face
- FaceCompareResponse
- FaceLocateResponse
- FaceLocateWithLandmarksResponse
- FaceMatch
- FacePoint
- FaceWithLandmarks
- FindSymbolResult
- FineTextDetectionResult
- FineTextItem
- GenderDetectionResult
- ImageDescriptionResponse
- ImageMetadata
- ImageMetadataExifValue
- NsfwResult
- ObjectDetectionResult
- PersonWithAge
- PersonWithGender
- PolygonPoint
- RecognitionOutcome
- TextDetectionResult
- TextItem
- VehicleLicensePlateDetectionResult
授权文件
阿皮基
- Type:API密钥
- API key参数名:Apikey
- Location:HTTP头
作者
- 项目
标签: