# Image boundary after rotation

**URL:** <https://discourse.julialang.org/t/image-boundary-after-rotation/13225>\
**Category:** General Usage\
**Created:** [August 11, 2018, 4:11am UTC](https://discourse.julialang.org/t/image-boundary-after-rotation/13225 "2018-08-11T04:11:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Post date:** [August 11, 2018, 4:11am UTC](https://discourse.julialang.org/t/image-boundary-after-rotation/13225/1 "2018-08-11T04:11:43Z")

</div>

Hi Guys!  
I am trying to find keypoints in a rotated and then subsampled image using fastcorners. My code:

```julia
tfm = Translation((r/2)-1,(c/2)-1) ∘ LinearMap(RotMatrix(-theta)) ∘ Translation(-((r/2)-1),-((c/2)-1))
uR = warp(img1, inv(tfm), indices(img1))
uT = subSam(uR, axes(uF)[1][1], axes(uF)[1][end], t) #subsampling in vertical direction. So resultant image is no longer a rectangle but a parallelogram
kpts = Keypoints(fastcorners(uT, 12, 0.5))

```

Now I want to remove keypoints at the boundary of the rotated and subsampled image(i.e. something like d distance from the boundary of the distorted image, parallelogram).  
Can you guys suggest something how I can proceed? kpts is storing the cartesian coordinates of the keypoints in the distorted image.  
Thanks!
