You can get a transform matrix from the viewport view in Houdini 11 by finding the perspective viewport associated with the viewer pane tab.
In H11 you can now drag the tab into a Python shell and get a reference to that pane. It should give you an instance for hou.SceneViewer. Assuming you just have the perspective viewer showing you can use hou.SceneViewer.curViewport() to get the hou.GeometryViewport you are actually looking through. You can then call hou.GeometrtyViewport.viewTransform() to get that matrix.
If you want to do it using a script you'll have to find the pane tab more manually. If it's from a tool you can use toolutils.activePane(kwargs) to find the viewer, or if it isn't you'll have to use hou.ui.curDesktop() to get the desktop information then look for a viewport using hou.Destop.paneTabOfType(hou.paneTabType.SceneViewer)
Graham Thompson, Technical Artist @ Rockstar Games