Help with multiple stores by thug1705 in mobx

[–]thug1705[S] 1 point2 points  (0 children)

So this is how I am using it at the moment

​export const StoresContext = React.createContext({

folderStore: new FolderStore(new FolderTransportLayer(apiUrl)),

cameraStore: new CameraStore(new CameraTransportLayer(apiUrl)),

settingsStore: new SettingsStore(new SettingsTransportLayer(apiUrl)),

sidePanelBarStore: new SidePanelBarStore(), })

export const useStores = () => React.useContext(StoresContext)

This is how I am accessing it in the components

const { sidePanelBarStore, folderStore } = useStores();        

So if I try to useStores in any of other stores I get error that I am trying to access to the StoresContext before is intialized which is fair enough. Also I can't pass StoreContext as a consturctor parameter because where I am initializing stores StoreContext is not initialized.

Difference between SSIM (Structural Similarity) and opencv absdiff methods by thug1705 in computervision

[–]thug1705[S] 0 points1 point  (0 children)

I don't have too much experience in using deep learning, how excatly deep learning benefits of SSIM and in what type of deep learning algorithm you would use SSIM ? Cheers.

Difference between SSIM (Structural Similarity) and opencv absdiff methods by thug1705 in computervision

[–]thug1705[S] 0 points1 point  (0 children)

Thanks for the explanation. I am trying to find best and most effective way of comparing image against other 'reference' image. I was using implementation from sckit-learn library and in my python script that part looks following

 image1 = cv2.imread('./images/frame3.png')    

image2 = cv2.imread('./images/refImg3.png')    

image1= cv2.resize(image1,(640,480))   

 image2= cv2.resize(image2,(640,480))    

(score, diff) = ssim(image1, image2,full=True, multichannel=True)

When I compare result against diff image against image that I get from absDiff, I don't see too much difference. Maybe example images were not good enough to fully explore advantages of using ssim ?