{ "info": { "author": "Xinyue Wei", "author_email": "sarahwei0210@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Blender for cv\nThis library helps CV researchers to generate data using blender.\n\n## Library tutorial\n\nThis repo provides a simple package `blcv` that can put models into scene and get images from different viewpoints.\n\n### Install\n\nYou can use `pip install blcv ` to install the package.\n\nNote that we should use `blcv` in Blender's bundled Python, so you need to install the package in Blender's Python environment.\n\nUse the following commands:\n\n`$ cd /blender-path/2.xx/python/bin/`\n\n`/blender-path/2.xx/python/bin$ python.exe get-pip.py`\n\n`/blender-path/2.xx/python/bin$ python.exe -m pip install blcv`\n\nIf you encounter more problems installing blcv in Blender environment, you can refer to this [answer]( https://blender.stackovernet.com/cn/q/14721 ).\n\nIf there is problems using `pip`, you can simply clone this repo, and use the files in `blcv` folder.\n\n### Functions\n\nblcv\n\n- call_blender(render_code, blender_executable_path, blank_blend_file_path, io_redirect='', background=True): activate Blender and call the script\n - render_code: directory to Blender script\n - blender_executable_path: directory to Blender.exe\n - blank_blend_file_path: Blender file\n - io_redirect: redirect the output into a file, use '' to show the output in command lines\n - background: whether run the Blender in background, default as 'True'\n\nblcv.tools\n\n- BcObject: operate an existed object in the scene\n - init(self, id): input the name of the object\n - destroy(self): delete the object\n - set_loc(self, x, y, z): set the object's location\n - get_loc(self, x, y, z): get the object's location\n - set_rot(self, x, y, z, w=None, mode='XYZ'): set the object's rotation; the mode includes 'AXIS_ANGLE', 'QUATERNION' and 'XYZ'\n - get_rot(self, mode='XYZ', w=None): set the object's rotation; the mode includes 'AXIS_ANGLE', 'QUATERNION' and 'XYZ'\n - set_scale(self, x, y, z): set the object's scale\n - get_scale(self, ): get the object's scale\n- BcCamera(BcObject): operate an camera in the scene\n - init(self, id): input the name of the camera\n - set_camera_to_center(self, dist, azimuth_deg, elevation_deg, theta_deg): given the camera's rotation, set the camera in the position towards the center point [0, 0, 0]\n- BcScene:\n - init(self)\n - set_render_mode(self, mode): set the background mode\n - get_img(self, filepath): save image crop in filaepath\n- import_obj(shape_file): import a new model into the scene and return its name\n\n### Demo\n\nYou can modify the configurations and run `start_blender.py` to call `blender_script` in Blender.\n\nThe demo generates airplane images from circle viewpoints using the models in `examples` folder, the results will be saved in `images` folder.\n\n### Contact\n\nIf you have any questions or encounter any problems, feel free to contact me by sarahwei0210@gmail.com.\n\n\n\n\n\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SarahWeiii/Blender_cv.git", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "blcv", "package_url": "https://pypi.org/project/blcv/", "platform": "", "project_url": "https://pypi.org/project/blcv/", "project_urls": { "Homepage": "https://github.com/SarahWeiii/Blender_cv.git" }, "release_url": "https://pypi.org/project/blcv/0.1.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "tools for using Blender for cv", "version": "0.1.0" }, "last_serial": 5995614, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "a57649171344c9590bd2e46ef35916e7", "sha256": "8ab26628c802b1df3a7b767053a0b86f94abb0f5f47fa5ed84ec59d675ea246e" }, "downloads": -1, "filename": "blcv-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a57649171344c9590bd2e46ef35916e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5543, "upload_time": "2019-10-18T06:04:30", "url": "https://files.pythonhosted.org/packages/e0/60/3b834c484f7ce80cf2d0632ebc37aef0e7076de33b55ab86c1c0cfac62bb/blcv-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5f669d2a42888515b016c3c9d549d3f4", "sha256": "37e33f25d23cd4295019b30ef7789c3c19cf8cc6791afa152c78e9805b535ff0" }, "downloads": -1, "filename": "blcv-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5f669d2a42888515b016c3c9d549d3f4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4675, "upload_time": "2019-10-18T06:04:33", "url": "https://files.pythonhosted.org/packages/65/ba/9fd104152b28e389e256eb67a6fcdc33fcc1770b18f861380b139a25c80f/blcv-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "663600ba4daa0875b8b21518ae5fe591", "sha256": "053df7d636c35ce7a6fb031fec945d42b1e2fd035d1a8ecf572006c3d5343a5e" }, "downloads": -1, "filename": "blcv-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "663600ba4daa0875b8b21518ae5fe591", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5362, "upload_time": "2019-10-18T13:20:45", "url": "https://files.pythonhosted.org/packages/a4/af/ffce6be64467eebdb23fc6dce4774c9bae1479b4bc980090539844e9e6fd/blcv-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c21a8fc547d674116c2e15f3658b14d0", "sha256": "6c309c09322ac7eec59f4da28d56950f7bdf57e572878db71b03d4b8421341fc" }, "downloads": -1, "filename": "blcv-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c21a8fc547d674116c2e15f3658b14d0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4133, "upload_time": "2019-10-18T13:20:47", "url": "https://files.pythonhosted.org/packages/7a/80/bff51cd060172583e12ae8292ab52769bb946cff905efe8f3ae673a4eee2/blcv-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "663600ba4daa0875b8b21518ae5fe591", "sha256": "053df7d636c35ce7a6fb031fec945d42b1e2fd035d1a8ecf572006c3d5343a5e" }, "downloads": -1, "filename": "blcv-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "663600ba4daa0875b8b21518ae5fe591", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5362, "upload_time": "2019-10-18T13:20:45", "url": "https://files.pythonhosted.org/packages/a4/af/ffce6be64467eebdb23fc6dce4774c9bae1479b4bc980090539844e9e6fd/blcv-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c21a8fc547d674116c2e15f3658b14d0", "sha256": "6c309c09322ac7eec59f4da28d56950f7bdf57e572878db71b03d4b8421341fc" }, "downloads": -1, "filename": "blcv-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c21a8fc547d674116c2e15f3658b14d0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 4133, "upload_time": "2019-10-18T13:20:47", "url": "https://files.pythonhosted.org/packages/7a/80/bff51cd060172583e12ae8292ab52769bb946cff905efe8f3ae673a4eee2/blcv-0.1.0.tar.gz" } ] }