Description Usage Arguments Value See Also Examples
Upload an image to the Pastec server to search the index for similar images.
1  | search_image(image_path, server)
 | 
image_path | 
 Path to an image to upload.  | 
server | 
 Pastec server.  | 
On a successful search, returns a list generated from Pastec's JSON response.
pastec_response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | ## Not run: 
nightwatch <- system.file("img", "SK-C-5.jpg", package = "PastecR")
erasmus1 <- system.file("img", "RP-P-1906-1485.jpg", package = "PastecR")
erasmus2 <- system.file("img", "RP-P-1906-1486.jpg", package = "PastecR")
erasmus3 <- system.file("img", "RP-P-1906-1487.jpg", package = "PastecR")
ps <- open_pastec_server()
add_image(erasmus1, 1, ps)
add_image(erasmus2, 2, ps)
search_results <- search_image(erasmus1, ps)
results_as_data_frame(search_results)
#>   height width  x   y image_id scores tags
#> 1    827   592 53 142        1    964   NA
#> 2    803   567 64 159        3     62   NA
#> 3    796   575 56 173        2     59   NA
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.