Skip to content

Commit

Permalink
Merge pull request #55 from UBC-MDS/imgfilter_documentation
Browse files Browse the repository at this point in the history
Updated Imgfilter test case
  • Loading branch information
zoepan00 authored Mar 14, 2020
2 parents 51f97a7 + 8cea84c commit 53cfe9a
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ To contribute to this project, you must adhere to the terms outlined in our [Cod

## Overview:

Want to edit an image in the shell instead of GUI applications? `rimager` is a R package that provides a quick and easy way to do some simple image processing and graphic editing. Based on the main needs of graphic editing, the package integrates four functionalities. The functionalities include: reducing the size of an image, cropping an image into a circle, reducing the number of colours in an image, and applying cool filter effects. By inputing the path of the image, users can run any of these functions with one line of code to get the desired image.
Want to edit an image in the shell instead of GUI applications? `rimager` is a R package that provides a quick and easy way to do some simple image processing and graphic editing. Based on the main needs of graphic editing, the package integrates four functionalities. The functionalities include: reducing the size of an image, cropping an image into a circle, reducing the number of colours in an image, and applying cool filter effects. By inputting the path of the image, users can run any of these functions with one line of code to get the desired image.

## Our package in R ecosystem:

@@ -68,7 +68,7 @@ devtools::install_github("UBC-MDS/rimager")
- jpeg
- OpenImageR

<span style="color:red"> Note: Because some operating systems (Ubuntu-16.04 '3.2', '3.3' '3.4' and mocOs-devel) need older version of packages (magick and plotrix) we used in development, we exclude the these OS in R-CMD-check. We got permission on slack.</span>
<span style="color:red"> Note: Because some operating systems (Ubuntu-16.04 '3.2', '3.3' '3.4' and macOs-devel) need older version of packages (magick and plotrix) we used in development, we exclude the these OS in R-CMD-check. We got permission on slack.</span>

see: [chat on slack for permission](https://ubc-mds.slack.com/archives/C24GEK3PV/p1584161232445700?thread_ts=1584159682.445100&cid=C24GEK3PV)

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ simple image processing and graphic editing. Based on the main needs of
graphic editing, the package integrates four functionalities. The
functionalities include: reducing the size of an image, cropping an
image into a circle, reducing the number of colours in an image, and
applying cool filter effects. By inputing the path of the image, users
applying cool filter effects. By inputting the path of the image, users
can run any of these functions with one line of code to get the desired
image.

@@ -85,7 +85,7 @@ devtools::install_github("UBC-MDS/rimager")
- OpenImageR

<span style="color:red"> Note: Because some operating systems
(Ubuntu-16.04 ‘3.2’, ‘3.3’ ‘3.4’ and mocOs-devel) need older version of
(Ubuntu-16.04 ‘3.2’, ‘3.3’ ‘3.4’ and macOs-devel) need older version of
packages (magick and plotrix) we used in development, we exclude the
these OS in R-CMD-check. We got permission on slack.</span>

2 changes: 1 addition & 1 deletion tests/testthat/test-imgfilter.R
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ test_that("Output image should be smaller or equal in size to original image arr
img <- OpenImageR::readImage('../mandrill.jpg')
h <- dim(img)[1]
w <- dim(img)[2]
output_img <- imgfilter('../mandrill.jpg', filter_type='blur', strength = 0.1)
output_img <- imgfilter('../mandrill.jpg', filter_type='blur', strength = 0.2, output_path = '../mandrill_imgfilter.jpg')
output_img2 <- imgfilter('../mandrill.jpg', filter_type='sharpen', strength = 0.1)
expect_lte(dim(output_img)[1], h)
expect_lte(dim(output_img)[2], w)
4 changes: 2 additions & 2 deletions vignettes/rimager-vignette.Rmd
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ library(rimager)

# Overview

[`rimager`](https://github.com/UBC-MDS/rimager) is a R package that provides a quick and easy way to do image processings and graphic editings. The package includes four functionalities: reduce the size of the image, crop the image into a circle, reduce the image colors, and blur or sharpen the image.
[`rimager`](https://github.com/UBC-MDS/rimager) is a R package that provides a quick and easy way to perform image processing and graphic editing. The package includes four functionalities: reduce the size of the image, crop the image into a circle, reduce the image colors, and blur or sharpen the image.


# Functions
@@ -53,7 +53,7 @@ A new image with the modified width and height will be created
## `imgfilter(input_path, filter_type, strength, output_path = NULL)`

#### Description:
The filter types include 'blur' and 'sharpen'; where blur blends neighboring pixels and sharpen enhances edges. The strength of the filter indicates how much of effect is apllied to the image; where 0 is no effect and 1 is very strong effect.
The filter types include 'blur' and 'sharpen'; where blur blends neighboring pixels and sharpen enhances edges. The strength of the filter indicates how much of effect is applied to the image; where 0 is no effect and 1 is very strong effect.

#### Arguments:

0 comments on commit 53cfe9a

Please sign in to comment.