Description Usage Arguments Details Value Examples

View source: R/hash_functions.R

This function calculates the dhash of an image

1 | ```
dhash(gray_image, hash_size = 8, MODE = "hash", resize = "nearest")
``` |

`gray_image` |
a (2-dimensional) matrix or data frame |

`hash_size` |
an integer specifying the hash size (should be less than number of rows or columns of the gray_image) |

`MODE` |
one of 'hash' (returns the hash of the image), 'binary' (returns binary identifier of the image) |

`resize` |
corresponds to one of 'nearest', 'bilinear' |

The function is a modification of the 'dhash' function of the imagehash package [ please consult the COPYRIGHT file ]. In comparison to average_hash and phash, the dhash algorithm takes into consideration the difference between adjacent pixels.

either a hash-string or a binary vector

1 2 3 4 5 6 7 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.