2012-04-10 31 views

答えて

0

利用 "画像"

画像(x)は、カラーマップ(HSV)< - あなたは、各ステーションの座標を取得する必要があり、Xは、細胞強度(x、y)の行列である

+0

明確にするために、私は 'x'は' 0'と '1'の間の値の2次元行列でなければならないと考えます。しかし、 'doc image'、' doc colormap'はそれよりも私が知っているよりも知っています。 –

+0

次に、値を0から255に再スケーリングし、hsv(255) – jdl

+0

を実行します。問題は 'imagesc'関数(自動スケーリング)と' jet'カラーマップで行われます。 – yuk

0

その周囲に円のポリゴンを作成し(半径を指定して)、このポリゴンをグリッドに変換します。次に、これらのグリッド(行列)を互いに重ね合わせます。速度のために、ポリゴンを使用する代わりに、ステーションの5行または列内のすべてのセルが値を取得するように、ステーションがカバーするセルを定義することもできます。 ステーションに入っているセルの値が1である2Dガウスフィルタをマトリックスに適用することもできます。ガウスカーネルの帯域幅は、カバレッジ半径(範囲)になります。 http://www.mathworks.ch/help/toolbox/images/ref/fspecial.html

5

ここでは、このようなプロットを作成する方法の例を示します。私はランダムにuniformly distributed pseudorandom numbersを使用して携帯電話基地局の位置を生成することによって、プロットのためのサンプルデータを作成することに注意してください:

%# Initializations: 
minRange = 0;  %# Lower x and y range 
maxRange = 3.5;  %# Upper x and y range 
resolution = 1000; %# The number of data points on the x and y axes 
cellRange = linspace(minRange, maxRange, resolution); 
[x, y] = meshgrid(cellRange); %# Create grids of x and y coordinates 
cellCoverage = zeros(size(x)); %# Initialize the image matrix to zero 

%# Create the sample image data: 
numBases = 200; 
cellRadius = 0.75; 
for iBase = 1:numBases 
    point = rand(1,2).*(maxRange - minRange) + minRange; 
    index = ((x - point(1)).^2 + (y - point(2)).^2) <= cellRadius^2; 
    cellCoverage(index) = cellCoverage(index) + 1; 
end 

%# Create the plot: 
imagesc(cellRange, cellRange, cellCoverage); %# Scaled plot of image data 
axis equal; %# Make tick marks on each axis equal 
set(gca, 'XLim', [minRange maxRange], ... %# Set the x axis limit 
     'YLim', [minRange maxRange], ... %# Set the y axis limit 
     'YDir', 'normal');    %# Flip the y axis direction 
xlabel('X-distance (km)'); %# Add an x axis label 
ylabel('Y-distance (km)'); %# Add a y axis label 
colormap(jet);    %# Set the colormap 
colorbar;     %# Display the color bar 

そしてここでは、得られたプロットです:

enter image description here

も注意してください内のデータということイメージ行列cellCoverageにはノイズが含まれておらず、スムージングが適用されていないため、投稿の元の画像よりもエッジが鮮明に表示されます(のデータから生成されます。 ere)。

関連する問題