How do I create a halftoning effect in MATLAB?

How to make an image with halftoning effect that uses 75 lpi?

2 件のコメント

Chaowei Chen
Chaowei Chen 2011 年 8 月 27 日
http://www.mathworks.com/matlabcentral/fileexchange/25303-image-halftoning-by-jarvis-method
harjan
harjan 2011 年 8 月 28 日
I want AM halftoning metod But Jarvis method is a FM halftoning method
Can u say abt AM method

サインインしてコメントする。

回答 (2 件)

Saneem Ahmed
Saneem Ahmed 2011 年 8 月 28 日

0 投票

9 件のコメント

harjan
harjan 2011 年 8 月 28 日
But i want formula to do this
Walter Roberson
Walter Roberson 2011 年 8 月 29 日
Code is a particularly stylized method of describing a formula.
harjan
harjan 2011 年 8 月 29 日
I have the formula to design a screen and if we apply it on the particular image we can get the AM halftoned image Formula is:
T(x,y)=cos(2*pi*i*fx) cos(2*pi*j*fy)
x,y=coordinates
fx fy=screen frequency(75 lpi) along x and y coordinate
By using this threshold function i will generate halftone image
But my question is how to choose the parameter values? pls reply
After that only i will proceed it.
Walter Roberson
Walter Roberson 2011 年 8 月 29 日
What parameter values need to be chosen? If you are concerned about the 75 not being correct on some screens, then
get(0,'ScreenPixelsPerInch')
will return the resolution of the first monitor of the current display.
harjan
harjan 2011 年 8 月 30 日
yes u r correct but i need some clarification about 75 lpi. In halftoning terms it means that 75 halftone cells per inch. For one halftone cell it have number of micro dots.By using the above formula how can i make 75 lpi(newspaper effect) halftoning effect.
Please clarify dis Thx in advance
Walter Roberson
Walter Roberson 2011 年 8 月 30 日
It appears newspapers are more often 85 lpi, which I estimate requires approximately 400 dpi at minimum.
http://en.wikipedia.org/wiki/Halftone
harjan
harjan 2011 年 8 月 31 日
Thx a lot sir But how to make dis effect using the above formula(by setting the values) and whats d relation between 400 dpi and 85 lpi
Walter Roberson
Walter Roberson 2011 年 8 月 31 日
fx and fy would be 400 for a screen or printer frequency of 400 dpi.
I did not attempt to locate a formula relating dpi and lpi with halftoning: it would depend upon what dot shape you were using and upon the cross-angle you were using. What I did is look at the table in that Wikipedia link and then did a linear interpolation between the 300 dpi and 600 dpi figures to estimate the minimum dpi that could handle 85 lpi (since the 600 dpi had 85 lpi as a lower bound, going up over 100 lpi, implying that you would be able to do 85 lpi with a lower dpi.)
harjan
harjan 2011 年 9 月 2 日
thx a lot sir...Can you know any reference for that AM halftoning technique......If it is possible kindly send to me...

サインインしてコメントする。

DGM
DGM 2022 年 10 月 27 日

0 投票

I'm going to completely ignore the issue of LPI and DPI. Something tells me that 20 people per month don't actually intend to feed this to a printer.
imgscale = 2; % scales the image
htmscale = 7; % scales the map WRT the image
% get an image and prepare it
inpict = imread('peppers.png');
inpict = im2double(rgb2gray(inpict));
inpict = imresize(inpict,imgscale);
% create constant-frequency map
s = size(inpict);
sc = imgscale*htmscale;
[xx yy] = meshgrid(1:s(2),1:s(1));
htm = 0.5*((cos(xx*2*pi./sc).*cos(yy*2*pi./sc))+1);
% perform thresholding
mask = inpict>htm;
% display it
imshow(mask)

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2011 年 8 月 26 日

回答済み:

DGM
2022 年 10 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by