My question is: I need to extract features from an image and save the features of each image in a separate file so that later on, I can apply arithmetic operations on these features. I need a python code or any link that you know can help me.
Without knwing waht kind of features you want is dificult to give a precise advise
In any case I think you can try scikit-image python library is quite intutive and easy to use:
https://scikit-image.org/
al Scipy has lot of tools
Here there is a tutorial of over 2 h where you can learn the basics of this libraries. with the corresponding jupyter notebook in the description of the video:
https://www.youtube.com/watch?v=d1CIV9irQAY
I recomend to dwonload and save python objects as arrays list or other similar things using Pickle package. You can load them later frot further use.
If you want to save an array from numpy to other format used np.savetxt()