Type: | Package |
Title: | Colorize Old Images Using the 'DeOldify' Image Colorization API |
Version: | 0.1.0 |
Description: | Call the 'DeOldify' https://github.com/jantic/DeOldify image colorization API on 'DeepAI'https://deepai.org/machine-learning-model/colorizer to colorize black and white images. |
License: | MIT + file LICENSE |
URL: | https://github.com/zumbov2/colorizer |
BugReports: | https://github.com/zumbov2/colorizer/issues |
SystemRequirements: | ImageMagick++: ImageMagick-c++-devel (rpm) or libmagick++-dev (deb) |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.1.1 |
Imports: | httr, magick, purrr, dplyr, stringr, tibble, magrittr |
Suggests: | gifski |
NeedsCompilation: | no |
Packaged: | 2020-10-30 22:02:43 UTC; david |
Author: | David Zumbach [aut, cre] |
Maintainer: | David Zumbach <david.zumbach@gfzb.ch> |
Repository: | CRAN |
Date/Publication: | 2020-11-06 10:30:07 UTC |
Save Colorized and Juxtaposed Images
Description
clsave
saves images that have been colorized using colorize
or
juxtaposed with juxtapose
.
Usage
clsave(response, destfile = "")
Arguments
response |
a response object of a |
destfile |
a character string or vector with the name where the images are saved. |
Value
Besides saving, the function returns the response object invisibly.
Examples
## Not run:
# Save colorized images
res <- colorize(img = "https://upload.wikimedia.org/wikipedia/commons/9/9e/Breadfruit.jpg")
clsave(res, destfile = "colorized_version.jpg")
## End(Not run)
Call Image Colorization API
Description
colorize
calls the DeOldify image colorization API on DeepAI.
Usage
colorize(
img,
key = "quickstart-QUdJIGlzIGNvbWluZy4uLi4K",
pane = c("plot", "view", "none")
)
Arguments
img |
path or URL to the images to be colorized. |
key |
DeepAI API key. |
pane |
defines in which pane the image is displayed: |
Details
With the default API key a few queries are possible. After registration on DeepAI https://deepai.org/, around 5000 free requests are currently possible.
Value
A tibble with the file locations of the original images and the response URLs to the colorized images. The latter expire after some time. It is recommended to save the colorized images.
Examples
## Not run:
# Call image colorization API
colorize(img = "https://upload.wikimedia.org/wikipedia/commons/9/9e/Breadfruit.jpg")
## End(Not run)
colorizer
package
Description
Colorize and Restore Old Images Using the 'DeOldify' Image Colorization API on 'DeepAI'
Details
See the README on GitHub
Compare Images
Description
juxtapose
compares the original image with the colorized version obtained with
colorize
.
Usage
juxtapose(
response,
type = c("side-by-side", "stacked", "c-focus", "h-focus", "v-focus", "h-split",
"v-split", "d-split", "u-animate", "s-animate"),
pane = c("plot", "view", "none")
)
Arguments
response |
a response object of a |
type |
defines the type of juxtaposition:
|
pane |
defines in which pane the image is displayed: |
Value
The function adds the comparison to the response object and returns it invisibly.
Examples
## Not run:
# Compare images
res <- colorize(img = "https://upload.wikimedia.org/wikipedia/commons/9/9e/Breadfruit.jpg")
juxtapose(res)
## End(Not run)