Open aozgur360 opened 2 years ago
Hi, I am not sure what the real issue is. I would suggest you to set a breakpoint at line 53 in frame_reg.m and see if imaxn or dthres is problematic.
Hi all, This seems to be an error arising in the latest version of Matlab. MiniP1PE on demo data was working up until I upgraded to Matlab Version 2022a at which point this error arose. I'm attempting a fix and will report back.
So the problem is in fuzzy.internal.utility.isFiniteNonemptyReal. Expected behavior is for all is all(isfinite(x)) to collapse to a single logical value, but because x is an mxn frame, all(isfinite(x)) returns a column array if all rows of a column are finite, resulting in the error. All(all(isfinite(x)) fixes the problem, though I haven't checked edge cases. However, matlab restricts making changes to the fuzzy logic toolbox, so this might need to be fixed at the level of MiniP1PE.
@aozgur360 @bscoventry To be compatible with the new matlab, I replace the calling of sigmf function with direct computing the sigmoid function at the same line in demons_prep.m, so there shouldn't be any problem.
@aozgur360 @bscoventry To be compatible with the new matlab, I replace the calling of sigmf function with direct computing the sigmoid function at the same line in demons_prep.m, so there shouldn't be any problem.
Thank you this fixed it for me!
Thank you! This seemed to fix this issue, but now later on I run into another problem of "index exceeds matrix dimensions". I don't think it's related? But I'm also unsure how to fix this
:
@aozgur360 Do you know the line # of the error message? I don't see it in the message.
Sorry, maybe the image I attached isn't showing up. The error shows up as line 15: "Error using min1pipe, Index exceeds matrix dimensions. Error in demo_min1pipe_AO (line 15), [fname, frawname, fregname] = min1pipe (Fsi, Fsi_new, [], [], ismc, flag);
@JinghaoLu @aozgur360 if I may chime in here, I also encountered this exact error. Noteably, I found a version of Matlab 2021b and the code does not have this error on the exact same dataset, exact same properties.
I traced the index exceeds dimensions to line 206, specifically tmp = m.reg(1: pixh, 1: pixw, idbatch(j): idbatch(j + 1) - 1);
Furthermore, it seems the Gaussian filter at line 19 in merge_roi "roi_gauss(reshape(full(roi), d1, d2, nseed));" also throws this error.
@bscoventry @aozgur360 The reason I asked this was because in the error message there wasn't a specific line of code in min1pipe.m. But based on @bscoventry and one of my previous colleague who is actively using MIN1PIPE as well, it seems that after I upgraded to the automatic parameter selection, I forgot to update the pixh and pixw, which seems the reason why you have this error on line 206. I have already corrected this but not tested it yet. You guys can try it out right now, or wait for my update when my colleague test it out. Will keep you updated.
@bscoventry @aozgur360 So it seems the update is good for the first run, but if you want to rerun it without overwriting the *_frame_all.mat, there is something missing. Therefore I made some further update.
@JinghaoLu Thank you so much! It works now for me
@aozgur360 Hold on to the latest version. There is some imperfection with the implementation so I am working on it. You can stick to the stable manual param selection version for now. Expect an update by the end of tomorrow. Thanks!
Hi, I am trying to run the latest version of Min1pipe but am getting this error early on. Do you have any suggestions? Thank you!![min1pipe_error](https://user-images.githubusercontent.com/77759136/160942657-c2a9c1e9-a2b2-4e56-adfd-6b86d50aa82c.PNG)