I have processed my image of the M101 Supernova and am very happy with the results. I was wondering if there is a way in PixInsight to add an arrow pointing to the Supernova?
You can make lines (segments) and things using PixelMath easily... but you have to put in numbers to place the lines correctly.
If you have a graphic of an arrow, you can use substitute (script) to put it where you want on the image.. but you need to ignore none arrow pixels when you do it.
Finally, you can draw an arrow by hand. Using the Clone Stamp tool...this is super easy... but it is likely you are looking for something digital/cleaner.
In the green and blue tabs copy exactly the same except replace "arrowRed" with "arrowGreen" or "arrowBlue" in the last line.
Copy the following into the symbols tab:
pointRight=1,
arrowLength=300,
arrowWidth=20,
arrowHead=40,
centreX=1456,
centreY=1908,
arrowRed = 1,
arrowGreen = 1,
arrowBlue = 0,
inShaft, inHead,
aL,aW,aH,cX, cY,
The pointRight parameter can be set to 1 if the arrow is to point right or zero if it is to point left. The next three parameters define how large the arrow will be in pixels. The centreX and centreY parameters define the point to which the arrow head will point in pixel coordinates. The colour of the arrow is defined by setting the arrowRed, arrowGreen and arrowBlue parameters - as written above will produce a yellow arrow (R=1, G=1, B=0).
Now instead of pointRight you have rotateAngle. An angle of zero corresponds to a right pointing arrow. An angle greater than zero will rotate the arrow anti-clockwise by the specified number of degrees about the point it is pointing to. Eg enter rotateAngle=90, will give an arrow pointing upwards.
Hey Mike the "drawannotation" script is great! Perhaps an enhancement that allows the user to choose a "circle" instead of the "arrow" at the end of the "pointing line". For example, I have a photo of NGC7000 and I want to highlight the area of the "Cygnus Wall". I would have a line with a circle (instead of an arrow) around the Cygnus Wall. Just something I could have used a couple of weeks ago.
Comments
aL = arrowLength/width();
aW = arrowWidth/height();
aH = arrowHead/width();
cX = centreX/width();
cY = centreY/height();
inShaft = iif(pointRight == 1,
((cX - X ()) < aL) && ((cY -- Y ()) < aW/2) && ((cX - X ()) > abs(cY - Y())),
((X() - cX) < aL) && ((cY -- Y()) < aW/2) && ((X() - cX) > abs(cY - Y())));
inHead = iif(pointRight == 1,
((cX - X ()) < aH) && (cX - X () > abs(cY - Y())),
((X() - cX) < aH) && (X() - cX > abs(cY - Y())));
iif(inHead || inShaft, arrowRed, $T);
In the green and blue tabs copy exactly the same except replace "arrowRed" with "arrowGreen" or "arrowBlue" in the last line.
Copy the following into the symbols tab:
pointRight=1,
arrowLength=300,
arrowWidth=20,
arrowHead=40,
centreX=1456,
centreY=1908,
arrowRed = 1,
arrowGreen = 1,
arrowBlue = 0,
inShaft, inHead,
aL,aW,aH,cX, cY,
The pointRight parameter can be set to 1 if the arrow is to point right or zero if it is to point left. The next three parameters define how large the arrow will be in pixels. The centreX and centreY parameters define the point to which the arrow head will point in pixel coordinates. The colour of the arrow is defined by setting the arrowRed, arrowGreen and arrowBlue parameters - as written above will produce a yellow arrow (R=1, G=1, B=0).
CS, Mike
aL = arrowLength/width();
aW = arrowWidth/height();
aH = arrowHead/width();
cX = centreX/width();
cY = centreY/height();
r = rdist(centreX, centreY);
a = pangle(centreX, centreY);
a = a + rotateAngle * pi() / 180;
rotX = (centreX + r * cos(a)) / width();
rotY = (centreY + r * sin(a)) / height();
inShaft = ((cX - rotX) < aL) && ((cY -- rotY) < aW/2) && ((cX - rotX) > abs(cY - rotY));
inHead = ((cX - rotX) < aH) && ((cX - rotX) > abs(cY - rotY));
iif(inHead || inShaft, arrowRed, $T);
Amend the last line for green and blue as before.
In symbols
rotateAngle=0,
arrowLength=300,
arrowWidth=20,
arrowHead=40,
centreX=1456,
centreY=1908,
arrowRed = 1,
arrowGreen = 1,
arrowBlue = 0,
inShaft, inHead,
aL,aW,aH,cX, cY,
r,a,rotX,rotY
Now instead of pointRight you have rotateAngle. An angle of zero corresponds to a right pointing arrow. An angle greater than zero will rotate the arrow anti-clockwise by the specified number of degrees about the point it is pointing to. Eg enter rotateAngle=90, will give an arrow pointing upwards.
CS, Mike
RGB/K: