It´s been and intense week full of work energic group, and we are almost there!!! :D Go LVP!!!
function [BW,maskedRGBImage] = createMask(RGB) | |
%createMask Threshold RGB image using auto-generated code from colorThresholder app. | |
% [BW,MASKEDRGBIMAGE] = createMask(RGB) thresholds image RGB using | |
% auto-generated code from the colorThresholder App. The colorspace and | |
% minimum/maximum values for each channel of the colorspace were set in the | |
% App and result in a binary mask BW and a composite image maskedRGBImage, | |
% which shows the original RGB image values under the mask BW. | |
% Auto-generated by colorThresholder app on 22-Oct-2018 | |
%------------------------------------------------------ | |
% Convert RGB image to chosen color space | |
RGB = im2double(RGB); | |
cform = makecform('srgb2lab', 'AdaptedWhitePoint', whitepoint('D65')); | |
I = applycform(RGB,cform); | |
% Define thresholds for channel 1 based on histogram settings | |
channel1Min = 47.714; | |
channel1Max = 94.428; | |
% Define thresholds for channel 2 based on histogram settings | |
channel2Min = -35.728; | |
channel2Max = -29.696; | |
% Define thresholds for channel 3 based on histogram settings | |
channel3Min = 13.372; | |
channel3Max = 39.345; | |
% Create mask based on chosen histogram thresholds | |
BW = (I(:,:,1) >= channel1Min ) & (I(:,:,1) <= channel1Max) & ... | |
(I(:,:,2) >= channel2Min ) & (I(:,:,2) <= channel2Max) & ... | |
(I(:,:,3) >= channel3Min ) & (I(:,:,3) <= channel3Max); | |
% Invert mask | |
BW = ~BW; | |
% Initialize output masked image based on input image. | |
maskedRGBImage = RGB; | |
% Set background pixels where BW is false to zero. | |
maskedRGBImage(repmat(~BW,[1 1 3])) = 0; |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% | |
% Matlab script | |
% | |
% SpaceApp2018 | |
% | |
% By: Hernan Giannetta (PhD) | |
% | |
% hgiannetta@frba.utn.edu.ar | |
% | |
% October 20-21, 2018 | |
% | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Init | |
clc; | |
clear all; | |
close all; | |
% Local Variables | |
ImageIRName = 'qm-lroc-1540099077964.png'; | |
ImageVISName = 'qm-lroc-1540099157713.png'; | |
outputfolderName='output'; | |
Image_Ori='Image_Ori'; | |
Image_VIS_original_filename='Image_VIS_original'; | |
Image_VIS_segmented_filename='Image_VIS_segmented'; | |
%------------------ | |
% Main | |
%------------------ | |
%------------------ | |
% VIS Image | |
%------------------ | |
ImageVISarray = imread(ImageVISName); | |
% Image selection to analize | |
I=ImageVISarray; | |
figure, imshow(I), title('original image'); | |
% %I = imread('coins.png'); | |
% level = graythresh(I); | |
% BW = im2bw(I,level); | |
% figure,imshow(BW) | |
%binarize | |
I_Proc=segmentImage(I); | |
BW = im2bw(I_Proc); | |
figure; imshow(BW), title('segmentImage'); | |
% erode | |
%SE1 = strel('arbitrary',eye(20)) | |
SE1 = strel('disk',2); | |
BW1 = imerode(BW,SE1); | |
figure; imshow(BW1), title('erode'); | |
% dilate image | |
SE2 = strel('disk',7); | |
BW2 = imdilate(BW1,SE2); | |
figure; imshow(BW2), title('imdilate'); | |
%edge detection | |
[~, threshold] = edge(BW2, 'sobel'); | |
fudgeFactor = .5; | |
BWs = edge(BW2,'sobel', threshold * fudgeFactor); | |
figure, imshow(BWs), title('binary gradient mask'); | |
%dilate | |
se90 = strel('line', 3, 90); | |
se0 = strel('line', 3, 0); | |
BWsdil = imdilate(BWs, [se90 se0]); | |
figure, imshow(BWsdil), title('dilated gradient mask'); | |
%Fill Interior Gaps | |
BWdfill = imfill(BWsdil, 'holes'); | |
figure, imshow(BWdfill); | |
title('binary image with filled holes'); | |
%Remove Connected Objects on Border | |
BWnobord = imclearborder(BWdfill, 4); | |
figure, imshow(BWnobord), title('cleared border image'); | |
%Smoothen the Object | |
seD = strel('diamond',1); | |
BWfinal = imerode(BWnobord,seD); | |
BWfinal = imerode(BWfinal,seD); | |
figure, imshow(BWfinal), title('segmented image'); | |
% erode image | |
SE1 = strel('disk',2); | |
BWfinal2 = imerode(BWfinal,SE1); | |
figure; imshow(BWfinal2), title('erode'); | |
% dilate image | |
SE2 = strel('disk',15); | |
BWfinal3 = imdilate(BWfinal2,SE2); | |
figure; imshow(BWfinal3), title('imdilate'); | |
%Smoothen2 the Object | |
seD = strel('diamond',1); | |
BWfinal = imerode(BWfinal3,seD); | |
BWfinal = imerode(BWfinal,seD); | |
figure, imshow(BWfinal), title('segmented image'); | |
BWoutline = bwperim(BWfinal); | |
Segout = I; | |
Segout(BWoutline) = 255; | |
figure, imshow(Segout), title('outlined original image'); | |
%---------------------- | |
% IR IMAGE | |
%---------------------- | |
ImageIRarray = imread(ImageIRName); | |
% Image selection to analize | |
I_IR=ImageIRarray; | |
figure, imshow(I_IR), title('original image'); | |
% create a mask | |
[BW,maskedRGBImage] = createMask(I_IR); | |
figure, imshow(BW), title('create a mask'); | |
% erode image | |
SE1 = strel('disk',8); | |
BWfinal2 = imerode(BW,SE1); | |
figure; imshow(BWfinal2), title('erode'); | |
% dilate image | |
SE2 = strel('disk',8); | |
BWfinal3 = imdilate(BWfinal2,SE2); | |
figure; imshow(BWfinal3), title('imdilate'); | |
%Fill Interior Gaps | |
BWdfill = imfill(BWfinal3, 'holes'); | |
figure, imshow(BWdfill); | |
title('binary image with filled holes'); | |
%Smoothen2 the Object | |
seD = strel('diamond',1); | |
BWfinal = imerode(BWdfill,seD); | |
BWfinal = imerode(BWfinal,seD); | |
figure, imshow(BWfinal), title('segmented image'); | |
% displaying the segmented object | |
BWoutline_IR = bwperim(BWfinal); | |
Segout_IR = I_IR; | |
Segout_IR(BWoutline_IR) = 255; | |
figure, imshow(Segout_IR), title('outlined original image'); | |
%---------------------- | |
% Arithmetic Image opperation VIS-IR | |
%---------------------- | |
%Calculate the absolute difference of the two images. | |
%Fill Interior Gaps | |
BWdfill = imfill(BWoutline, 'holes'); | |
figure, imshow(BWdfill); | |
title('binary image with filled holes'); | |
BWdfill_IR = imfill(BWoutline_IR, 'holes'); | |
figure, imshow(BWdfill); | |
title('binary image with filled holes'); | |
% K = imabsdiff(BWdfill,BWdfill_IR); | |
% figure, imshow(K), title('Arithmetic Image opperation VIS-IR'); | |
K = imadd(BWdfill,BWdfill_IR); | |
figure, imshow(K), title('Arithmetic Image opperation VIS-IR'); | |
close all; | |
% displaying the segmented object | |
BWoutline_IR_Add = bwperim(K); | |
Segout_IR = I_IR; | |
Segout_IR(BWoutline_IR_Add) = 255; | |
figure, imshow(Segout_IR), title('Lava Tube Identified'); | |
function [BW,maskedImage] = segmentImage(im) | |
%segmentImage segments image using auto-generated code from imageSegmenter App | |
% [BW,MASKEDIMAGE] = segmentImage(IM) segments image IM using auto-generated | |
% code from the imageSegmenter App. The final segmentation is returned in | |
% BW and a masked image is returned in MASKEDIMAGE. | |
% Auto-generated by imageSegmenter app on 22-Oct-2018 | |
%---------------------------------------------------- | |
% Convert to grayscale | |
im = rgb2gray(im); | |
% Initialize segmentation with threshold | |
mask = im>1; %(16) | |
% Evolve segmentation | |
BW = activecontour(im, mask, 2, 'Chan-Vese'); | |
% Form masked image from input image and segmented image. | |
maskedImage = im; | |
maskedImage(~BW) = 0; | |
end |
Dear Jury:
We have been experiencing difficulties to upload our proyect information through the Proyect flap during the weekend so we contacted organization to find a solution.
Thank you for your kind understanding. In this flap you will find the Proyect explanation at the very beggining of it.
Best regards,
Lunar Village People
RESOURCES
•LRO (Lunar Reconnaissance Orbiter)
•PhD Thesis-UTN : H. Giannetta “Studies of materials and MEMS processes for the implementation of a tunable microsensor in the infrared band”.
•“Thermal anomaly at the Earth's surface associated with a lava tube”
•Gravity meassurement , Mission NASA GRAIL
• Evidence of large empty lava tubes on the Moon using GRAIL gravit measurement of echo, Mission JAXA SELENE
• Detection of intact lava tubes at Marius Hills on the Moon by SELENE (Kaguya) lunar radar sounder.
OBJECTIVE
Mission to the moon!: detection of nearby-to-lava-tubes zones suitable for landing through an improved sensor, and research for more lava tubes on Moon´s ground.
METHODOLOGY
Application of IR sensor improved with tunable bands based on graphene to increase spacial resolution for lava tubes detection and digital image processing. This correlated with use of Machine Learning model based on parameters such as Infrared, Gravimeter and Magnetic Suceptibility data available from NASA and also taken on the Moon.
CONSIDERATIONS
The best landing place will be selected focusing on:
-Basic needs of a suitable place for landing (pre-established by uses and customs): Adequate topography, no rocks, not abrupt field, with little amount of dust
-Scientific interest: Areas of historical geological interest (Extraction of samples for analysis), proximity to lava tubes that will be used as a base settlement refuge. (Detection of intact lava tubes at Marius Hills on the Moon by SELENE (Kaguya) lunar radar sounder)
-Proximity to reservoirs of water for supply. (The presence of ice has been detected in the areas of the lunar poles)
-Other, such as economic: presence of construction amterials (High areas: calcite, plagioclase, gabbro and anortite., A lot of aluminum: refractory. Ideal gaps for construction and glass for amalgamation. Low areas: basaltic lithology, associated with volcanic devices, titanium and iron oxides. Add info about the geological past of the moon)SpaceApps is a NASA incubator innovation program.