JPG 画像のトリミング次のスクリプトを使用して、下のウェーハマップ画像の外側から明るい灰色の境界線をトリミングしようとしています。 前後の画像に違いがないため、切り抜きメッセージがどのように機能するかを理解していないと思います。
私が間違っていることについて何か考えはありますか?
乾杯、トロイ
img = open("D:\wafer.jpg", jpg);
win1 = newWindow("Original", img);
img << crop(left(5),right(5),top(5),bottom(5));
win2 = newWindow("Cropped", img);
img << savePicture("D:\waferCropped.jpg", jpg);

スクリプティングRe: JPG 画像のトリミング@ジョージ指さしたhttps://www.jmp.com/support/help/en/16.1/?os=win&source=application&utm_source=helpmenu&utm_medium=application#page/jmp/images.shtml
と同じように見えますスクリプトガイド.構文リファレンス。

次のスクリプト インデックスを参照してください。

どちらも「新しい画像を作成する」と言っていますが、混乱の一部であった既存の画像のみが変更されており、どちらもパラメーターをうまく説明していません。 このセグメントとは異なる別の作物があります。
ご覧いただきありがとうございます!
Re: JPG 画像のトリミングご指摘いただきありがとうございます。 以前のコメントで参照されているドキュメントは何ですか?
ありがとう、
キアナ
Re: JPG 画像のトリミングはい、それは非自明なインターフェースであり、より良いドキュメントが必要です。 @匿名
pixels = [
-11 -11 -11 -11 -11 -11 -11 -11 -11,
-11 -11 -91 -99 -99 -99 -99 -92 -11,
-11 -11 -99 -99 -99 -99 -99 -99 -11,
-11 -11 -99 -99 -99 -99 -99 -99 -11,
-11 -11 -99 -99 -99 -99 -99 -99 -11,
-11 -11 -93 -99 -99 -99 -99 -94 -11];
img = New Image( pixels );
{hSize, ySize} = img << size;
Show( img << getsize, img << getpixels );
// crop the -11 out of the image
img << crop( Left( 2 ), Right( 8 ), top( 1 ), bottom( 6 ) );
Show( img << getsize, img << getpixels );
//// img << getsize = {6, 5};
//// img << getpixels =
//// [ -91 -99 -99 -99 -99 -92,
//// -99 -99 -99 -99 -99 -99,
//// -99 -99 -99 -99 -99 -99,
//// -99 -99 -99 -99 -99 -99,
//// -93 -99 -99 -99 -99 -94];
The zero-based pixel indexes are on the hairlines between the pixels.The zero-based pixel indexes are on the hairlines between the pixels.The zero-based pixel indexes are on the hairlines between the pixels.The zero-based pixel indexes are on the hairlines between the pixels.The zero-based pixel indexes are on the hairlines between the pixels.ゼロベースのピクセル インデックスは、ピクセル間のヘアライン上にあります。
Re: JPG 画像のトリミング親愛なる@ティエリー_S 、
ドキュメンテーションに「新しいイメージを作成する...」とあるように、この動作は奇妙です。
しかし、実際にはトリミングは現在の画像を変更しているため、私の目にはドキュメントは正しくなく、誤解を招くものです。
@tonya_mauldin 、これに従ってドキュメントを変更する必要があると思いますか?
Names Default To Here( 1 );
img = Open( "$SAMPLE_IMAGES/tile.jpg", jpg );
Print( "Size before crop:", img << get size );
img << Crop(
Left( 50 ),
Right( 400 ),
Top( 50 ),
Bottom( 400 )
);
Print( "Size before crop:", img << get size );
print("So crop changes the image and does not create a new one as written in the documentation");画像 (jmp.com)
Re: JPG 画像のトリミング良くやった。 あなたが提供した右と下の定義は、あなたが指定したとおりではありません。 あなたのスクリプトは的を射ています!
以下のスクリプトを参照してください。
Names Default To Here( 1 );
img = Open( "$SAMPLE_IMAGES/tile.jpg", jpg );
s = {w,h} = img << get size();
show( s ); //{451, 451}
obj = New Window( "tile(40,40)", img );
Wait( 1 );
img << Crop( Left( 50 ), Right( 100 ), Top( 60 ), Bottom( 150 ) );
s = {w,h} = img << get size();
show( s ); //{50, 90}
//img is a matrix of pixels the initail size is 1 to 451 columns aka "w" width
//and "h" is height 1 to 451 rows
//Crop Left(x) is the starting column and Right(y) is the ending column
//Top() and Bottom() works the same, so after the crop the width is 100-50=50
//and the height is 150-60=90Re: JPG 画像のトリミングクロップ機能の仕組みを理解していなかったようです。 基本的に、トリミングする画像の高さと幅を知り、トリミングするときにそれらの値を LHS と TOP エッジに対して相対的に操作する必要があります。
Left = 左側から削除するピクセル数
右 = 保持する残りの画像の「幅」(ピクセル単位)
Top = 画像の上から削除するピクセル数
Bottom = 保持する残りの画像の「高さ」(ピクセル単位)
img = open("D:\WaferMaps\8PTPCVEB\wafer.jpg", jpg);
imgX = (img << GetSize)[1];
imgY = (img << GetSize)[2];
win1 = newWindow("Original", img);
myTrimBy = 5;
img << crop(left(myTrimBy),right(imgX - myTrimBy), top(myTrimBy), bottom(imgY - myTrimBy));
win2 = newWindow("Cropped", img);
img << savePicture("D:\WaferMaps\8PTPCVEB\waferCropped.jpg", jpg);
Re: JPG 画像のトリミングThierryさん、返信ありがとうございます。
私もまさにそれを試しましたが、運がありませんでした。
Re: JPG 画像のトリミングやあ、
トリミングされた画像を変数に割り当てるのを忘れたと思います:
img2 = img << crop(left(5),right(5),top(5),bottom(5));
win2 = newWindow("Cropped", img2);
一番、
TS
JPG画像の切り抜きありがとう@Craige_Hales
とても(!)役に立ちました