Hi all
When using Starshot, I need to invert the original image previous to “.analyze()” so my output is not the one of the image. (see below)
I 've tried “file_star.invert()” and then, using a file_star.plot(), I get the image with the inverse colors. However, when feeding this inverted image into “analyze()”, the original image is used for the analysis.
Hi Dani,
There definitely should be an invert parameter like there is on other modules like picket fence! I’ll add it to the list. For the time being you can edit the inversion checker function here: https://github.com/jrkerns/pylinac/blob/master/pylinac/starshot.py#L205 and swap the values, i.e. (96, 50, 4). That should come to the opposite inversion as the original. Let us know if it works!
Awesome! One other thing that I just noticed that may be the original factor is the dead space on the corners. In your new, correct inverted image I now see a lot of out-of-image dead space. These pixels may have contributed to the original problem. You can try cropping the image before analyzing and using the original inversion numbers. I.e.
star = Starshot(...) star.image.crop(pixels=30) # or however many star.analyze(...)
I solved the problem using both possible solutions proposed by James in this post:
Easy way: if the darkened spikes of the star do not reach the edges of the scanned image, crop your image (see avobe)
Hard way: invert the parameters of the starshot module... That can be tricky and affect all other statshot analysis, I wouldn't recommend that unless the "easy way" don't work
I'm out of office now, next Monday I'll see if I can me if more help