Coastal-Imaging-Research-Network / CIRN-Quantitative-Coastal-Imaging-Toolbox

The CIRN Introduction to Quantitative Coastal Imaging Toolbox is a collection of MATLAB scripts to produce geo-rectified images specifically tailored for quantitative analysis of coastal environments.
GNU General Public License v3.0
21 stars 7 forks source link

CIRN-Introduction-to-Quantitative-Coastal-Imaging-Toolbox #21

Closed SharifaKar closed 3 years ago

SharifaKar commented 4 years ago

Hi,

Just wanted to jump in and say that this toolbox is awesome! I am not familiar with MATLAB and this tutorial is very thorough, detailed, but not hard to follow.

Thanks Brittany!

burritobrittany commented 4 years ago

It looks like your extrinsics are not calculated correctly. If I can remember correctly this was probably because they were all in a line across the image. You may need more GCPs or try to 'fix' some of your initial guesses in C.

What were your solved for extrinsics in C. Do they make sense?

sivaiahborra commented 4 years ago

These are my solved extrinsics 745895.896682619 1959828.76921353 13.6052837156303 1.86375169641548 1.63798958439335 0.608841942358704 Here are the guess ones [ 745888,1959765,10 deg2rad(75) deg2rad(74) deg2rad(0)]

burritobrittany commented 4 years ago

You have a swing value of 0.6088 radians. This corresponds to a swing of 34 degrees. Looking at your image, I would think at most you would have 1 -2 degrees of swing. I would try fixing your roll at 0 or 1 to narrow your solution. You may have to do this iteratively to get an accurate solution. This is line 142 in C.

The more accurate way would be to have more coverage of GCPs in the cross-shore.

Knowing the precision of your GCPs, you should be careful with your results and state the estimated accuracies.

sivaiahborra commented 4 years ago

Do you mean that do I need to do no. of iterations while changing following line in C till swing value reaches 0 extrinsicsKnownsFlag= [ 0 0 0 0 0 0]; % [ x y z azimuth tilt swing]

But, Do I need to fix each extrinsics every time or same extrinsic?

burritobrittany commented 4 years ago

Fix your swing to 0. Look at your extrinsics solution. Then put this solution as your initialGuess the next iteration and unfix swing. This should help guide the solver to find the correct solution.

sivaiahborra commented 4 years ago

Sure, I will do thata and then let you know

On Mon, 19 Oct, 2020, 4:42 pm burritobrittany, notifications@github.com wrote:

Fix your swing to 0. Look at your extrinsics solution. Then put this solution as your initialGuess the next iteration and unfix swing. This should help guide the solver to find the correct solution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Coastal-Imaging-Research-Network/CIRN-Quantitative-Coastal-Imaging-Toolbox/issues/21#issuecomment-712073137, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOKXS4QWUJOBOA3WXXTBHC3SLQNK3ANCNFSM4O4TSCYA .

sivaiahborra commented 4 years ago

Dear @burritobrittany

I did by increasing and improving GCPs and got the results are as follows.

Screenshot (513) Screenshot (512) Screenshot (511) Screenshot (510) Screenshot (509)

But, still last part G2_pixelInstruments.m, it's showing me black images of Grid, x and y. Please let me know what to do improve the images of grid, x and y from being black.

Thank you.

sivaiahborra commented 3 years ago

Dear @burritobrittany, Can you let me know what to do to improve my images of Grid, alongshore and crosshore transects as output of G2_pixelinstruments.m. I am getting dark, bright and timex images are fine as shown above, but stil images of G2_pixelinstruments.m are coming as black. Please do let me know where to do modification/improvement in codes or inputs to get these images as proper?

Thank you.

sivaiahborra commented 3 years ago

Dear Brittany, I could successfully run QCIT with my data and got the cBathy array, x and y transects as well . Now I had to run cBathy by inputting cbathyarray derived from QCIT to estimate bathymetry. So, in this regard, I tried running democBathy.m or cBathyDemoWithPlots.m in the cBathy toolbox as initially with sample data given in it. But, i am throwing with the following error, I think it's kind of dimensional error and need to do some changes in argus02.a.m but, I am not sure based on which I do some changes in aargus02a.m to fix this issue. Please do let me know once. If I once successfully run cBathy with demo data so that i can run the same with my own data.

The error is as follows. Index exceeds matrix dimensions.

Error in analyzeBathyCollect (line 55) str = [bathy.sName(16:21) ', ' bathy.sName(36:39) ', ' bathy.sName([23 24 26 27])];

Error in analyzeSingleBathyRunNotCIL (line 33) bathy = analyzeBathyCollect(xyz, t, data, cam, bathy);

Error in democBathy (line 10) bathy = analyzeSingleBathyRunNotCIL(stackName, stationStr);

10th line in democBathy.m is bathy = analyzeSingleBathyRunNotCIL(stackName, stationStr);

argus02a.m is as follows from line 1 to 34 %%% Site-specific Inputs params.stationStr = 'argus02a'; params.dxm = 10; % analysis domain spacing in x params.dym = 25; % analysis domain spacing in y params.xyMinMax = [80 500 0 1000]; % min, max of x, then y % default to [] for cBathy to choose params.tideFunction = 'cBathyTide'; % tide level function for evel

%%%%%%% Power user settings from here down %%%%%%% params.MINDEPTH = 0.25; % for initialization and final QC params.minValsForBathyEst = 4; % min num f-k pairs for bathy est.

params.QTOL = 0.5; % reject skill below this in csm params.minLam = 10; % min normalized eigenvalue to proceed params.Lx = 3params.dxm; % tomographic domain smoothing params.Ly = 3params.dym; % params.kappa0 = 2; % increase in smoothing at outer xm params.DECIMATE = 1; % decimate pixels to reduce work load. params.maxNPix = 80; % max num pixels per tile (decimate excess)

% f-domain etc. params.fB = [1/18: 1/50: 1/4]; % frequencies for analysis (~40 dof) params.nKeep = 4; % number of frequencies to keep

% debugging options params.debug.production = 1; params.debug.DOPLOTSTACKANDPHASEMAPS = 1; % top level debug of phase params.debug.DOSHOWPROGRESS = 1; % show progress of tiles params.debug.DOPLOTPHASETILE = 1; % observed and EOF results per pt params.debug.TRANSECTX = 200; % for plotStacksAndPhaseMaps params.debug.TRANSECTY = 900; % for plotStacksAndPhaseMaps

% default offshore wave angle. For search seeds. params.offshoreRadCCWFromx = 0;

similarly, testStack102210Duck.mat has 3 variables such as xyz(8576x3 double), data(2048x8576 unit8), t(1x2048 double)

Inorder to maintain same style, I made a .mat file by having xyz, data and t from pixelinstruments.mat file derived from G2 in QCIT just like above said .mat file(testStack102210Duck.mat).

Please do let me know now how to fix this issue, where and based on which I do changes to go ahead to run successfully cBathy as well to extract bathymetry.

Thank you for your time and patience.

*Thanks & *Regards B. Sivaiah Research Scholar Dept. of Meteorology & Oceanography Andhra University Visakhapatnam - 530003 INDIA - 91-9676155827

On Mon, Oct 19, 2020 at 4:42 PM burritobrittany notifications@github.com wrote:

Fix your swing to 0. Look at your extrinsics solution. Then put this solution as your initialGuess the next iteration and unfix swing. This should help guide the solver to find the correct solution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Coastal-Imaging-Research-Network/CIRN-Quantitative-Coastal-Imaging-Toolbox/issues/21#issuecomment-712073137, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOKXS4QWUJOBOA3WXXTBHC3SLQNK3ANCNFSM4O4TSCYA .

burritobrittany commented 3 years ago

Hi @sivaiahborra,

Sorry I have not been available lately. That is great news you got the pixel instruments to work as well as your rectification!

So the toolbox does not have all the formatting required by cBathy yet. It does however have the correct data.

Error in analyzeBathyCollect (line 55) str = [bathy.sName(16:21) ', ' bathy.sName(36:39) ', ' bathy.sName([23 24 26 27])];

this is just the name of the cBathy file in their format. I would just make str=[]; in that code.

That being said- you will probably have some issues with cBathy, it can be more sensitive then the toolbox. Please feel free to reach out and ask more questions.

A couple of things to be aware of... Your pixel instruments should be in local coordinates. I attached some files on how I format and run cBathy using pixel instruments from the toolbox. It may be a bit more helpful.

cbathyexample.zip

sivaiahborra commented 3 years ago

Dear Brittany, Thanks, I'll check it out and let you know.

On Tue, 19 Jan, 2021, 4:18 pm burritobrittany, notifications@github.com wrote:

Hi @sivaiahborra https://github.com/sivaiahborra,

Sorry I have not been available lately. That is great news you got the pixel instruments to work as well as your rectification!

So the toolbox does not have all the formatting required by cBathy yet. It does however have the correct data.

Error in analyzeBathyCollect (line 55) str = [bathy.sName(16:21) ', ' bathy.sName(36:39) ', ' bathy.sName([23 24 26 27])];

this is just the name of the cBathy file in their format. I would just make str=[]; in that code.

That being said- you will probably have some issues with cBathy, it can be more sensitive then the toolbox. Please feel free to reach out and ask more questions.

A couple of things to be aware of... Your pixel instruments should be in local coordinates. I attached some files on how I format and run cBathy using pixel instruments from the toolbox. It may be a bit more helpful.

cbathyexample.zip https://github.com/Coastal-Imaging-Research-Network/CIRN-Quantitative-Coastal-Imaging-Toolbox/files/5835355/cbathyexample.zip

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Coastal-Imaging-Research-Network/CIRN-Quantitative-Coastal-Imaging-Toolbox/issues/21#issuecomment-762761707, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOKXS4SIGNIO3HSOZKRMMGTS2VPP3ANCNFSM4O4TSCYA .

sivaiahborra commented 3 years ago

dear @burritobrittany, I have done changes in analyzeBathyCollect.m(55 line), then I am getting results as following. bathy

Now, I have created .mat file which is having xyz(7125x3), data(592x7125 double) and t(1x592) from my pixinst (in local coordinates) from G2 of QCIT, after that I followed the code (test_bathy.m) that you sent me. I had few basic queries that how and based on which details of my pixel instruments, I have to give the details in cBathy parameters section of test_bathy.m as per my own data

Based on which details of my results from QCIT, where and what I have to do changes in test_bathy.m I don't think, I need to do some changes in cBathy functions as well while I am going through my data.

Sorry for many questions and thank you for your time.

burritobrittany commented 3 years ago

This issue has migrated to the cbathy page.

sivaiahborra commented 3 years ago

Dear @burritobrittany What could be the reason to not pick horizon automatically well while running D_gridGenExampleRect.m of QCIT, Where do I need do or check properly to set it right?

Screenshot (43)

sivaiahborra commented 3 years ago

I may be wrong in giving local angle it seems.

sivaiahborra commented 3 years ago

Dear @burritobrittany I have seen your guiBathy-Source-Code respiratory, I hope it's continuation of CIRN-QCIT for bathymetry estimation from cBathy. Is there any documentation for guiBathy-Source-Code just like CIRN-QCIT? if so, let me know and moreover thank you for your efforts by proving these toolboxes. Does this respiratory work in matlab R2017a?

burritobrittany commented 3 years ago

Hi @sivaiahborra, We have documentation at https://github.com/erdc/guiBathy under technical report. It is not as developed as CIRN QCIT. However, it is .exe GUI for Windows that does not need MATLAB at all.

For the source code...I am not sure if it works on 2017...we have not tested this yet. It was constructed using R2019. The main feature needed is the App Creator.

Best, Brittany

sivaiahborra commented 3 years ago

Dear @burritobrittany Thank you for your reply, I have tried to get bathymetry using cBathy by input created from CIRN QCIT. Now I am looking to get rest of the other parameters such as nearshore bathymetry, shoreline, run-up etc. please do let me know if any such kind already.

Thank you for your time.