I shared above the test image I want to set an outline to. Of course, this is an example of what I want to work on.
The outline is not a rectangle nor a circle nor…, but a two pixels (or more) black dots all around (and inside the two 'a's) the image.
I’ve made two kinds of searches: programmatically (and that leaded to create two masks…) and via google: most of the answers are about how to add a rectangle around the graphic (with or without a graphic software…).
My google search sentence ended to:
site:stackoverflow.com Draw a black outline around a figure -matlab -Adobe -matplotlib -Text
I get two different results with my current code:
the same image, but black instead of red,
the above inverted image (the original image in white, the remainding of the image is black).
Now, I test two pixels in two loops: the first is white, the second is not white: I draw a black pixel. That meant (in my mind) I found the first pixel of an image, but I was wrong, this does not works.
I am short of testing ideas / google search sentence.
Ideas are welcome.