{"id":15562772,"url":"https://github.com/sonsongithub/opencv-help-library","last_synced_at":"2025-09-16T17:30:06.959Z","repository":{"id":1473388,"uuid":"1715316","full_name":"sonsongithub/OpenCV-Help-Library","owner":"sonsongithub","description":"OpenCV Help Library for iOS","archived":false,"fork":false,"pushed_at":"2011-06-09T07:06:14.000Z","size":549,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T23:12:17.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://sonson.jp","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonsongithub.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":"2011-05-07T13:00:21.000Z","updated_at":"2018-12-23T20:28:29.000Z","dependencies_parsed_at":"2022-07-29T17:39:51.160Z","dependency_job_id":null,"html_url":"https://github.com/sonsongithub/OpenCV-Help-Library","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/sonsongithub%2FOpenCV-Help-Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FOpenCV-Help-Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FOpenCV-Help-Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonsongithub%2FOpenCV-Help-Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonsongithub","download_url":"https://codeload.github.com/sonsongithub/OpenCV-Help-Library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528873,"owners_count":21445518,"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":[],"created_at":"2024-10-02T16:16:14.465Z","updated_at":"2025-09-16T17:30:01.891Z","avatar_url":"https://github.com/sonsongithub.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"OpenCV Help Library\r=======\r![sample image](http://sonson.jp/wp/wp-content/uploads/2011/05/sample_image_ohl.png)\r\rThis library helps OpenCV programming on iOS. Currently, it includes a mutual converter UIImage \u003c-\u003eIplImage.\rYou can convert them mutually without complicated codes.\r\r### Sample code - Covert IplImage and CGImage\r\t// Convert to CGImageRef from IplImage\r\tCGImageRef p = CGCreateImageWithIplImage(originalSourceImage);\r\t// Convert to IplImage(RGB) from CGImageRef\r\tIplImage *duplicatedFromCGImage = CGCreateIplImageWithCGImage(p);\r\r### Sample code - Load IplImage\r\tNSString *path = [[NSBundle mainBundle] pathForResource:@\"testImage_Gray_PNG24.png\" ofType:nil];\r    IplImage *original = cvLoadImage([path UTF8String], CV_LOAD_IMAGE_COLOR);\r\rLicense\r=======\r * BSD license\r \rHow to use\r=======\r * Import OpenCVHelpLibrary.h/m into your project.\r \rUIImage OpenCV Help Library Additions Reference\r=======\r\r\t+ (UIImage*)imageWithIplImage:(IplImage*)inputImage;\r###Parameters\r###inputImage\rThe image to be converted to UIImage.\r###Return value\rAn autoreleased new bitmap image as UIImage.\r###Discussion\rNone.\r\r\t- (IplImage*)createIplImage;\r###Return value\rA new IpImage bitmap image. You are responsible for releasing this object by calling cvReleaseImage.\r###Discussion\rOutput image is 24bit color.\r\rOpenCV Help Library Reference\r=======\r\tIplImage* CGCreateIplImageWithCGImage(\r\t\tCGImageRef imageRef,\r\t\tint iscolor\r\t);\r###Parameters\r###inputImageRef\rThe image to be converted to IplImage.\r###iscolor\rOutput IplImage's color type. You can use only CV\\_LOAD\\_IMAGE\\_GRAYSCALE, CV\\_LOAD\\_IMAGE\\_COLOR or CV\\_LOAD\\_IMAGE\\_ANYCOLOR and MUST NOT USE(NOT SUPPORTED) any combinations of these types. Specific color type of the loaded image: if , the loaded image is forced to be a 3-channel color image; if CV\\_LOAD\\_IMAGE\\_GRAYSCALE, the loaded image is forced to be grayscale; if , the loaded image will be loaded as is (note that in the current implementation the alpha channel, if CV\\_LOAD\\_IMAGE\\_ANYCOLOR, is stripped from the output image, e.g. 4-channel RGBA image will be loaded as RGB).\r###Return value\rA new IpImage bitmap image. You are responsible for releasing this object by calling cvReleaseImage.\r###Discussion\rNone.\r\r\tCGImageRef CGCreateImageWithIplImage(\r\t\tIplImage* inputImage\r\t);\r###Parameters\r###inputImage\rThe image to be converted to CGImage.\r###Return value\rA new Quartz bitmap image. You are responsible for releasing this object by calling CGImageRelease.\r###Discussion\rNone.\r\r\tIplImage* cvLoadImage(const char* filename, int iscolor);\r###Parameters\r###filename\rThe full or relative pathname of your image file.\r###iscolor\rOutput IplImage's color type. You can use only CV\\_LOAD\\_IMAGE\\_GRAYSCALE, CV\\_LOAD\\_IMAGE\\_COLOR or CV\\_LOAD\\_IMAGE\\_ANYCOLOR and MUST NOT USE(NOT SUPPORTED) any combinations of these types. Specific color type of the loaded image: if , the loaded image is forced to be a 3-channel color image; if CV\\_LOAD\\_IMAGE\\_GRAYSCALE, the loaded image is forced to be grayscale; if , the loaded image will be loaded as is (note that in the current implementation the alpha channel, if CV\\_LOAD\\_IMAGE\\_ANYCOLOR, is stripped from the output image, e.g. 4-channel RGBA image will be loaded as RGB).\r\r###Return value\rA new IpImage bitmap image. You are responsible for releasing this object by calling cvReleaseImage.\r###Discussion\rThis function supports the following file formats only,\r\r1. JPEG files - JPEG, JPG, JPE\r2. Portable Network Graphics - PNG\r\rConstants\r=======\r\t//#define CV_LOAD_IMAGE_UNCHANGED  \t-1\t\t// not supported\r\t#define CV_LOAD_IMAGE_GRAYSCALE   \t0\r\t#define CV_LOAD_IMAGE_COLOR       \t1\r\t//#define CV_LOAD_IMAGE_ANYDEPTH    \t2\t\t// not supported\r\t#define CV_LOAD_IMAGE_ANYCOLOR    \t4\r\t\r###CV\\_LOAD\\_IMAGE\\_GRAYSCALE\r###CV\\_LOAD\\_IMAGE\\_COLOR\r###CV\\_LOAD\\_IMAGE\\_ANYCOLOR\r\rBlog\r=======\r * [sonson.jp][]\rSorry, Japanese only....\r\rDependency\r=======\r * [Quartz Help Library][]\r\r[sonson.jp]: http://sonson.jp\r[Quartz Help Library]: https://github.com/sonsongithub/Quartz-Help-Library","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsongithub%2Fopencv-help-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonsongithub%2Fopencv-help-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonsongithub%2Fopencv-help-library/lists"}