The PixLab Computer Vision Team is pleased to introduce the Pixel Generate API endpoint (/pixelgenerate) which let you in a single call, generate on the fly, images filled with random pixels of desired width & height using a mix of standard Image Processing and soon Machine Learning algorithms.
This endpoint is similar to /newimage except that the image contents is filled with random pixels. This is very useful for generating background (negative) samples for feeding Machine Learning training algorithms for example.
By default, this endpoint return a JSON object holding a link to the generated image output. But, you can set it via the Blob parameters to return the image binary contents instead.
Below, a Python snippet which generate on the fly a new image of height & width of 300x300 filled with random pixels using a single call to /pixelgenerate:
The code sample used to achieve such result is available to consult via the following Github link:
- Python code for generating random pixels: pixel_generate.py.
- The endpoint documentation is available to consult at pixlab.io/cmd?id=pixelgenerate.
- Others code samples including Passports & ID Scanning ,Face Blurring, etc. and for a general introduction to the PixLab API, refer to our Github Repository and Examples Page.