RGB image components misaligned - plot

I am using aplypy to create an RGB image of the Eagle nebula from three FITS files, representing the red, green and blue components of the image. The FITS files are available here, 673nm being the red, 656nm the green and 502nm the blue.
import aplpy
aplpy.make_rgb_cube(['673nmos.fits','656nmos.fits','502nmos.fits'], 'nmod_cube.fits')
aplpy.make_rgb_image('nmod_cube.fits','nmod.png')
f = aplpy.FITSFigure('../data/nmod_cube_2d.fits')
f.show_rgb('../data/output/nmod.png')
The image should look something like this, but comes out looking like the image below. The blue component is clearly misaligned with the red and green.
make_rgb_cube is supposed to realign the three images in to the same projection based on the WCS information in each FITS header, according to the docs, but it doesn't seem to be working in this case.
Do I need to employ a star matching library to get the alignment accuracy?

There is an error in the WCS coordinates in the header of the Blue FITS file. I have contacted spacetelescope.org to alert them.
Another example from the site, of M17, is created correctly using the aplpy script shown in the question. Blinking through each filter using DS9, as suggested in the comments, confirms the correct alignment.

Use the STScI software TweakReg to align the images and get a good alignment before combining. More information and worked examples can be found on the DrizzlePac website.
TweakReg:
Combining images using astrodrizzle requires that the WCS information in the headers of each input image align to within sub-pixel accuracy. The tweakreg task allows the user to align sets of images to each other and/or to and external astrometric reference frame or image.
It is optimized for use with HST instruments, but can be adapted for other observatories/instruments.

Related

Cut and move a part of an image in inkscape

I've an image like the one in the following link
https://www.freecodecamp.org/news/how-to-center-an-image-using-text-align/
I want to cut and move one half of the image close to the other (one building close to the other in the example image share above). In real case, I have a similar image with white space in between. To cut one part of an image I do Object-> Clip -> Set on the selection. This crops the selection alone. But I am not sure how to select and move the selection.
Could someone please help?
Duplicate the image, then clip both images to the two parts that you need. Then use snapping to move them both together exactly.
Or (better), use a raster graphics editing tool of your choice and do the same. While the above-described workflow works, Inkscape, being a vector graphics editor, is not the appropriate tool for this kind of thing.

How can I extract "Good Morning" from the provided image? [duplicate]

I'm completely new to Tesseract OCR. This problem might be simple but I can't seem to find the answer using Google.
Basically, I have an image that contains two parts: the first part, which is at the top of the image, has a black background with texts in white color; the second part, which is at the bottom of the image, has white background with texts in black color.
I ran tesseract on the image, which correctly recognized all characters in the bottom part, but none in the top part. I am sure that the characters on the top part is very clear and should be easy to recognize by Tesseract. The only difference is that it has black background.
Is there a way to use Tesseract to recognize texts in both black and white background at the same time?
A paper by T. Kasar, J. Kumar, and A. G. Ramakrishnan describes one solution to the problem: "Font and Background Color Independent Text Binarization". The paper can be found here. There is an implementation of the algorithm by Jason Funk. His implementation can be found here.
I have had some success with the algorithm. I think this type of solution is what you are looking for.
You might also find it helpful to review this recently asked question on background removal (OpenCV for OCR: How to compute thresholding levels for gray image OCR) and its answer. You may be able separate regions of interest by background color and then hand each region to tesseract for processing. Alternatively, post binarization you could invert the 8x8 pixel regions (described in answer above) in the black background portion of the image (or vice versus) to create a uniform background.
Finally, you may find some useful information by searching for solutions to the number plate recognition problem (or license plates). Many number plates (license plates) have background images or lighting artifacts that can interfere with recognition. The more general problem is background removal.

illustrator tracing sharp edges

I am new to Illustrator. I watched some videos about image tracing to make vectors and it worked for me so far until today. If i try to make simple colours and shapes into vectors it is brilliant. Today though i have an image that uses 3 colours and a pattern. The colours i use are black, orange and dark grey. I have a pattern of thick grey lines covering 50% of the image. I played with the tracing settings for hours but it just refuses to keep the lines straight. It makes the lines rounded. Check out the first image versus the second one.
[1] https://ibb.co/eoEVYa
[2] https://ibb.co/nOu8KF
Image Trace is a great tool, but it's not perfect. Adjusting the settings may improve it but it won't be perfect. If possible depending on the design, especially one as simple as the example images you've included here you should use another method. To recreate the lines there maybe:
create a line at the angle you want (Pen or Line tool),
duplicate that line and move it above the first,
align the two,
use the blend tool to add as many copies between the two as needed,
expand them,
make a background to fill the negative space and move behind the lines,
create a rectangle shape with no fill and position above the others,
shape build the excess areas away
Example

Only show group once while tiling with SVG

I'm designing a website which uses a SVG-document as background. I want this image to tile on the X-axis. Which works great, but I wanted to know if it is possible to show one group in the SVG only once, such that in subsequent tiles the group is hidden.
The above image visualizes what I want to achieve. The image having one group (in the image the red circle) that is invisible in the following tiles.
Now I am aware such things can be achieved using additional CSS backgrounds but I am really interested if such thing could be achieved using a single SVG background.
Thanks in advance!
The answer is no. If you are relying on CSS to tile the background - ie. with repeat-x, then no. there isn't any way to do what you want. When an SVG is used as a background like that, it becomes immutable - effectively the same as a PNG or a JPEG.
You will need to use a different method.

Using Paint Bucket In Photoshop

So i'm trying to use the paint bucket in Photoshop CS6 to design a logo for a client of mine.
http://i.stack.imgur.com/Et7OO.png ( What I currently have)
I want to colour the pale bits left with a different shade of green, when I use the paint bucket it covers the whole image, how do I colour in the remaining bits with the colour I want?
when picking the paint bucket you can change the tolerance in the top bar so that it only changes the colours you want. At the moment its most likely at 100 but if you change it to 20 or so it should work for you.
Another possibility could be that you are using the paint bucket on the wrong layer. Make sure you have the layer of piece of the image you want to change selected.
EDIT: Also, you are better off asking this question here. That community can help you better with that type of question.

Resources