My pick this week is a fun one that takes your images and transforms them into how they may have looked if painted by an impressionist. Here are some of my photos impressionized. I’ll use the imageDatastore and a custom ‘ReadFcn’ to do everything in one shot for me.
function Iimp = impressionizeAndCompare(filename) imshow(filename) title('Original') snapnow Iimp = impressionism(filename); imshow(Iimp) title('Impressionized') snapnow end
imds = imageDatastore(pwd,'ReadFcn',@impressionizeAndCompare); readall(imds);
David has provided a bunch of options for tuning how the painting looks as well.
Iimp = impressionism('membrane.png', 'brush sizes', [16 8 4], ... 'max length', 80, 'blur factor', 1.5); imshow(Iimp)
I’m sure marketing won’t be too fond of that.
Iimp = impressionism('dsfadf.png', 'brush sizes', [16 8 4], 'max length', 80); imshow(Iimp)
My only suggestion for David is that the function should take a matrix as input as well as a filename (similar to imshow).
The function takes a while to compute on large images and by only taking the filename, I need to first read in the image,
imresize it, write it out, and then call impressionism.
Published with MATLAB® R2017b
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。