{"id":23213355,"url":"https://github.com/nagipragalathan/orangelab","last_synced_at":"2026-05-18T07:32:55.820Z","repository":{"id":207823980,"uuid":"720184766","full_name":"NagiPragalathan/OrangeLab","owner":"NagiPragalathan","description":"The Python module developed for the Orange Python Tool Plugin serves a dual purpose, providing functionalities for both image processing using OpenCV and the generation of synthetic datasets through the Faker library.","archived":false,"fork":false,"pushed_at":"2023-11-17T20:14:03.000Z","size":48991,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T03:23:57.819Z","etag":null,"topics":["ai","data-mining","data-science","dataset","fake-data-generator","image","image-processing","ml","orange","python3","pyton"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/OrangeLab/","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/NagiPragalathan.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.txt","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}},"created_at":"2023-11-17T19:09:13.000Z","updated_at":"2023-11-17T20:08:54.000Z","dependencies_parsed_at":"2023-11-17T20:44:38.661Z","dependency_job_id":null,"html_url":"https://github.com/NagiPragalathan/OrangeLab","commit_stats":null,"previous_names":["nagipragalathan/orangelab"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/NagiPragalathan/OrangeLab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FOrangeLab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FOrangeLab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FOrangeLab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FOrangeLab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NagiPragalathan","download_url":"https://codeload.github.com/NagiPragalathan/OrangeLab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NagiPragalathan%2FOrangeLab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33169245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","data-mining","data-science","dataset","fake-data-generator","image","image-processing","ml","orange","python3","pyton"],"created_at":"2024-12-18T19:17:19.298Z","updated_at":"2026-05-18T07:32:55.783Z","avatar_url":"https://github.com/NagiPragalathan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# OrangeLab\n\n\u003cdiv style=\"text-align:center\"\u003e\n  \u003cimg src=\"https://img.recraft.ai/wQ0kjs2kMmj5eWcJqeRcP_JMtDZ9DJN2Ma3v5sLdBDI/rs:fit:1024:1024:0/q:80/g:no/plain/abs://prod/images/15803871-d5b3-4b04-bc9e-7659de4894ab@avif\" width=\"100\" style=\"border-radius:15px\" /\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\nThe Python module developed for the Orange Python Tool Plugin serves a dual purpose, providing functionalities for both image processing using OpenCV and the generation of synthetic datasets through the Faker library.\n\n[GitHub](https://github.com/NagiPragalathan/OrangeLab)\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n# Fake Dataset Generator Documentation\n\n## Introduction\n\nThe `generate_fake_dataset` function is designed to generate a fake dataset based on the provided configuration using the Faker library. This can be useful for testing, development, or generating sample data.\n\n## Function Signature\n\n```python\ngenerate_fake_dataset(num_rows, path=\"fake_dataset.csv\", none_values=True, table_head=None)\n```\n\n- `num_rows`: Number of rows to generate in the dataset.\n- `path`: The path where the generated dataset will be saved. Default is \"fake_dataset.csv\".\n- `none_values`: Whether to include None values in the generated dataset. Default is `True`.\n- `table_head`: A dictionary specifying the columns and their configurations.\n\n## Column Configuration\n\nThe `table_head` dictionary defines the columns of the dataset, where each key is the column name, and the value is a dictionary specifying the column configuration. Supported configurations include:\n\n- `type`: Faker provider type (e.g., \"name\", \"email\", \"passport_gender\").\n- `dtype`: Data type (e.g., \"int\").\n- `range`: Range of values for integer columns (e.g., \"1-100\").\n- `len`: Length of integer columns.\n\n## Example Usage\n\n```python\nimport pandas as pd\nfrom faker import Faker\n\n# Define the column configurations\ntable_head = {\n    \"name\": {\"type\": \"name\"},\n    \"email\": {\"type\": \"email\"},\n    \"gender\": {\"type\": \"passport_gender\"},\n    \"age\": {\"dtype\": \"int\", \"range\": \"10-100\"},\n    \"score\": {\"dtype\": \"int\", \"range\": \"10-100\"},\n    \"time_s\": {\"dtype\": \"int\", \"range\": \"10-100\"},\n}\n\n# Generate a fake dataset with 500 rows and save it to a CSV file\ngenerate_fake_dataset(500, \"sample.csv\", True, table_head)\n```\n\n## Supported Faker Providers\n\nThe `Faker` library provides a wide range of providers for generating fake data. Some of the supported types include:\n\n```python\nTypes = [ \"aba\", \"add_provider\", \"address\", \"administrative_unit\", \"am_pm\", \"android_platform_token\", \"ascii_company_email\", \"ascii_email\", \"ascii_free_email\", \"ascii_safe_email\", \"bank_country\", \"basic_phone_number\", \"bban\", \"binary\", \"boolean\", \"bothify\", \"bs\", \"building_number\", \"cache_pattern\", \"catch_phrase\", \"century\", \"chrome\", \"city\", \"city_prefix\", \"city_suffix\", \"color\", \"color_hsl\", \"color_hsv\", \"color_name\", \"color_rgb\", \"color_rgb_float\", \"company\", \"company_email\", \"company_suffix\", \"coordinate\", \"country\", \"country_calling_code\", \"country_code\", \"credit_card_expire\", \"credit_card_full\", \"credit_card_number\", \"credit_card_provider\", \"credit_card_security_code\", \"cryptocurrency\", \"cryptocurrency_code\", \"cryptocurrency_name\", \"csv\", \"currency\", \"currency_code\", \"currency_name\", \"currency_symbol\", \"current_country\", \"current_country_code\", \"date\", \"date_between\", \"date_between_dates\", \"date_object\", \"date_of_birth\", \"date_this_century\", \"date_this_decade\", \"date_this_month\", \"date_this_year\", \"date_time\", \"date_time_ad\", \"date_time_between\", \"date_time_between_dates\", \"date_time_this_century\", \"date_time_this_decade\", \"date_time_this_month\", \"date_time_this_year\", \"day_of_month\", \"day_of_week\", \"del_arguments\", \"dga\", \"domain_name\", \"domain_word\", \"dsv\", \"ean\", \"ean13\", \"ean8\", \"ein\", \"email\", \"emoji\", \"enum\", \"factories\", \"file_extension\", \"file_name\", \"file_path\", \"firefox\", \"first_name\", \"first_name_female\", \"first_name_male\", \"first_name_nonbinary\", \"fixed_width\", \"format\", \"free_email\", \"free_email_domain\", \"future_date\", \"future_datetime\", \"generator_attrs\", \"get_arguments\", \"get_formatter\", \"get_providers\", \"hex_color\", \"hexify\", \"hostname\", \"http_method\", \"iana_id\", \"iban\", \"image\", \"image_url\", \"internet_explorer\", \"invalid_ssn\", \"ios_platform_token\", \"ipv4\", \"ipv4_network_class\", \"ipv4_private\", \"ipv4_public\", \"ipv6\", \"isbn10\", \"isbn13\", \"iso8601\", \"items\", \"itin\", \"job\", \"json\", \"json_bytes\", \"language_code\", \"language_name\", \"last_name\", \"last_name_female\", \"last_name_male\", \"last_name_nonbinary\", \"latitude\", \"latlng\", \"lexify\", \"license_plate\", \"linux_platform_token\", \"linux_processor\", \"local_latlng\", \"locale\", \"locales\", \"localized_ean\", \"localized_ean13\", \"localized_ean8\", \"location_on_land\", \"longitude\", \"mac_address\", \"mac_platform_token\", \"mac_processor\", \"md5\", \"military_apo\", \"military_dpo\", \"military_ship\", \"military_state\", \"mime_type\", \"month\", \"month_name\", \"msisdn\", \"name\", \"name_female\", \"name_male\", \"name_nonbinary\", \"nic_handle\", \"nic_handles\", \"null_boolean\", \"numerify\", \"opera\", \"optional\", \"paragraph\", \"paragraphs\", \"parse\", \"passport_dates\", \"passport_dob\", \"passport_full\", \"passport_gender\", \"passport_number\", \"passport_owner\", \"password\", \"past_date\", \"past_datetime\", \"phone_number\", \"port_number\", \"postalcode\", \"postalcode_in_state\", \"postalcode_plus4\", \"postcode\", \"postcode_in_state\", \"prefix\", \"prefix_female\", \"prefix_male\", \"prefix_nonbinary\", \"pricetag\", \"profile\", \"provider\", \"providers\", \"psv\", \"pybool\", \"pydecimal\", \"pydict\", \"pyfloat\", \"pyint\", \"pyiterable\", \"pylist\", \"pyobject\", \"pyset\", \"pystr\", \"pystr_format\", \"pystruct\", \"pytimezone\", \"pytuple\", \"random\", \"random_choices\", \"random_digit\", \"random_digit_above_two\", \"random_digit_not_null\", \"random_digit_not_null_or_empty\", \"random_digit_or_empty\", \"random_element\", \"random_elements\", \"random_int\", \"random_letter\", \"random_letters\", \"random_lowercase_letter\", \"random_number\", \"random_sample\", \"random_uppercase_letter\", \"randomize_nb_elements\", \"rgb_color\", \"rgb_css_color\", \"ripe_id\", \"safari\", \"safe_color_name\", \"safe_domain_name\", \"safe_email\", \"safe_hex_color\", \"sbn9\", \"secondary_address\", \"seed\", \"seed_instance\", \"seed_locale\", \"sentence\", \"sentences\", \"set_arguments\", \"set_formatter\", \"sha1\", \"sha256\", \"simple_profile\", \"slug\", \"ssn\", \"state\", \"state_abbr\", \"street_address\", \"street_name\", \"street_suffix\", \"suffix\", \"suffix_female\", \"suffix_male\", \"suffix_nonbinary\", \"swift\", \"swift11\", \"swift8\", \"tar\", \"text\", \"texts\", \"time\", \"time_delta\", \"time_object\", \"time_series\", \"timezone\", \"tld\", \"tsv\", \"unique\", \"unix_device\", \"unix_partition\", \"unix_time\", \"upc_a\", \"upc_e\", \"uri\", \"uri_extension\", \"uri_page\", \"uri_path\", \"url\", \"user_agent\", \"user_name\", \"uuid4\", \"vin\", \"weights\", \"windows_platform_token\", \"word\", \"words\", \"xml\", \"year\", \"zip\", \"zipcode\", \"zipcode_in_state\", \"zipcode_plus4\"]\n```\n\nAlso you can use `supported_types()` function to find the supported types.\n\nFor a complete list of supported providers, refer to the `Faker` documentation or use the `Faker.providers` module to explore available options.\n\n# OCR Installation and Tesseract Path Finder\n\n## Introduction\n\nThe provided Python script includes functions to install an OCR (Optical Character Recognition) tool from an installer executable and to find the path to the Tesseract OCR executable on the system.\n\n## Functions\n\n### 1. `install_ocr()`\n\nThis function installs an OCR tool using an installer executable. The installer file should be specified as `ocr.exe`. The function retrieves the current script's path, combines it with the installer filename to create the full installer path, and then attempts to run the installer using `subprocess.run()`.\n\n#### Example Usage:\n\n```python\n# Example: Install OCR\ninstall_ocr()\n```\n\n### 2. `find_tesseract()`\n\nThis function attempts to find the path to the Tesseract OCR executable. It first checks if Tesseract is installed in a specific path (`C:\\Program Files\\Tesseract-OCR\\tesseract.exe`). If not found, it then tries to locate Tesseract in the system's PATH using `shutil.which(\"tesseract\")`.\n\n#### Example Usage:\n\n```python\n# Example: Find Tesseract Path\ntesseract_path = find_tesseract()\n\nif tesseract_path:\n    print(f\"Tesseract found at: {tesseract_path}\")\nelse:\n    print(\"Tesseract not found.\")\n```\n\n## Important Note\n\n- Ensure that the installer file (`ocr.exe`) is in the same directory as the script or provide the correct path to the installer in the `install_ocr()` function.\n- For `find_tesseract()`, if Tesseract is not found in the specified path or in the system's PATH, it will return `None`.\n\n## Recommendations\n\n- Before using `install_ocr()`, verify that the installer file is compatible with your system.\n- Make sure to have the necessary permissions to install software on the system.\n- If you are installing from a source other than PyPI, ensure that it is trusted or has been verified by an individual who knows what they\n\n# Image Processing and OCR Functions Documentation\n\nThe provided Python script includes various functions for image processing using OpenCV and image-to-text extraction using Tesseract OCR. Below is the documentation for each function along with example usages.\n\n## Image Processing Functions\n\n### 1. `read_image(image_path)`\n\nRead an image from the specified path using OpenCV.\n\n#### Example Usage:\n\n```python\nimage = read_image('path/to/image.jpg')\n```\n\n### 2. `display_image(img, title='Image')`\n\nDisplay the image using Matplotlib.\n\n#### Example Usage:\n\n```python\ndisplay_image(image, title='Original Image')\n```\n\n### 3. `convert_to_grayscale(img)`\n\nConvert the image to grayscale.\n\n#### Example Usage:\n\n```python\ngray_image = convert_to_grayscale(image)\n```\n\n### 4. `apply_blur(img, kernel_size=(5, 5))`\n\nApply Gaussian blur to the image.\n\n#### Example Usage:\n\n```python\nblurred_image = apply_blur(image, kernel_size=(9, 9))\n```\n\n### 5. `edge_detection(img, low_threshold=50, high_threshold=150)`\n\nApply Canny edge detection to the image.\n\n#### Example Usage:\n\n```python\nedges = edge_detection(gray_image, low_threshold=30, high_threshold=100)\n```\n\n### 6. `resize_image(img, new_size=(300, 300))`\n\nResize the image to the specified dimensions.\n\n#### Example Usage:\n\n```python\nresized_image = resize_image(image, new_size=(500, 500))\n```\n\n### 7. `adjust_brightness_contrast(img, alpha=1.5, beta=30)`\n\nAdjust the brightness and contrast of the image.\n\n#### Example Usage:\n\n```python\nadjusted_image = adjust_brightness_contrast(image, alpha=2.0, beta=50)\n```\n\n### 8. `apply_threshold(img, threshold_value=128, max_value=255, threshold_type=cv2.THRESH_BINARY)`\n\nApply a binary threshold to the image.\n\n#### Example Usage:\n\n```python\nthresholded_image = apply_threshold(gray_image, threshold_value=100, max_value=255, threshold_type=cv2.THRESH_BINARY)\n```\n\n### 9. `apply_dilation(img, kernel_size=(5, 5))`\n\nApply dilation to the image.\n\n#### Example Usage:\n\n```python\ndilated_image = apply_dilation(thresholded_image, kernel_size=(3, 3))\n```\n\n### 10. `change_image_color(img, channel, value)`\n\nChange the intensity of a specific color channel.\n\n#### Example Usage:\n\n```python\nmodified_image = change_image_color(image, channel=2, value=50)\n```\n\n### 11. `find_and_draw_contours(img)`\n\nFind contours in the image and draw them.\n\n#### Example Usage:\n\n```python\ncontour_image = find_and_draw_contours(thresholded_image)\n```\n\n### 12. `most_used_color(img)`\n\nFind the most used color in the image.\n\n#### Example Usage:\n\n```python\nmost_used_color_value = most_used_color(image)\n```\n\n### 13. `image_details(img)`\n\nGet details about the image, including dimensions and pixel values.\n\n#### Example Usage:\n\n```python\ndetails = image_details(image)\n```\n\n### 14. `image_to_ascii(img, scale_factor=0.1)`\n\nConvert the image to ASCII art.\n\n#### Example Usage:\n\n```python\nascii_art = image_to_ascii(image, scale_factor=0.05)\nprint(ascii_art)\n```\n\n## OCR Function\n\n### 15. `extract_text_from_image(image_path, tesseract_path)`\n\nExtract text from an image using Tesseract OCR.\n\n#### Example Usage:\n\n```python\ntext = extract_text_from_image('path/to/image.png', 'path/to/tesseract.exe')\nprint(text)\n```\n\n**Note**: Ensure that Tesseract is installed and provide the correct path to the Tesseract executable in the `extract_text_from_image` function you can use install_ocr() for ocr installation.\n\nThe following are additional image processing functions that enhance the capabilities of the provided script. These functions can be used in combination with the existing ones to perform a wider range of image manipulations.\n\n### 16. `rotate_image(img, angle)`\n\nRotate the image by a specified angle.\n\n#### Function Signature:\n\n```python\nrotate_image(img, angle)\n```\n\n#### Parameters:\n\n- `img`: The input image.\n- `angle`: The angle by which to rotate the image.\n\n#### Example Usage:\n\n```python\nrotated_image = rotate_image(image, angle=45)\n```\n\n### 17. `apply_mask(img, mask)`\n\nApply a binary mask to the image.\n\n#### Function Signature:\n\n```python\napply_mask(img, mask)\n```\n\n#### Parameters:\n\n- `img`: The input image.\n- `mask`: Binary mask with the same dimensions as the image.\n\n#### Example Usage:\n\n```python\n# Assuming 'mask' is a binary mask with the same dimensions as the image\nmasked_image = apply_mask(image, mask)\n```\n\n### 18. `invert_image(img)`\n\nInvert the colors of the image.\n\n#### Function Signature:\n\n```python\ninvert_image(img)\n```\n\n#### Parameters:\n\n- `img`: The input image.\n\n#### Example Usage:\n\n```python\ninverted_image = invert_image(image)\n```\n\n### 19. `add_noise(img, intensity=50)`\n\nAdd random noise to the image.\n\n#### Function Signature:\n\n```python\nadd_noise(img, intensity=50)\n```\n\n#### Parameters:\n\n- `img`: The input image.\n- `intensity`: Intensity of the noise.\n\n#### Example Usage:\n\n```python\nnoisy_image = add_noise(image, intensity=30)\n```\n\n### 20. `morphological_operations(img, operation='dilate', kernel_size=(5, 5))`\n\nApply morphological operations (dilation or erosion) to the image.\n\n#### Function Signature:\n\n```python\nmorphological_operations(img, operation='dilate', kernel_size=(5, 5))\n```\n\n#### Parameters:\n\n- `img`: The input image.\n- `operation`: Operation to perform ('dilate' or 'erode').\n- `kernel_size`: Size of the kernel for the operation.\n\n#### Example Usage:\n\n```python\n# Dilate the image\ndilated_image = morphological_operations(image, operation='dilate', kernel_size=(3, 3))\n\n# Erode the image\neroded_image = morphological_operations(image, operation='erode', kernel_size=(3, 3))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagipragalathan%2Forangelab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnagipragalathan%2Forangelab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagipragalathan%2Forangelab/lists"}