Corners of an image

Hi Guys! I am writing some code for feature detection.

I was wondering if there is a way to find the corners of an image, for instance the actual image provided to us is not necessarily a rectangle(maybe a parallelogram or some random shapes with corners and edges).

Thanks!

I’m not sure I understand, the image is not in a rectangle matrix of pixels? Or are there pixels you consider not part of the image?

@yakir12 Thanks for the response!
I mean the pixels are not arranged as a rectangle. Maybe arranged as a parallelogram. Thus still having 4 corners.

It would be useful if there is a reference/specification or standard of such images or layout of memory structure. For example, rectangle images can just be matrices, then how would one define a parallelogram as data structure?