首页 \ 问答 \ OpenCV加载/保存直方图数据(OpenCV load/save histogram data)

OpenCV加载/保存直方图数据(OpenCV load/save histogram data)

有没有办法将OpenCv图像直方图存储到磁盘,以便可以直接加载OpenCv图像直方图,而无需再次加载图像并从中计算直方图?

谢谢。


Is there any way to store an OpenCv image histogram to disk so it can be loaded directly without being forced to load the image again and computing the histogram from it?

Thank you.


原文:https://stackoverflow.com/questions/10277439
更新时间:2022-11-04 07:11

最满意答案

我把两个模型放在一起解决了这个问题:

@model Tuple< AAS.Management.Models.AdvertisementModel,IEnumerable< AAS.Management.Models.AdvertisementContentModel>>
@using (@Html.BeginForm()) { 
@*divs for first model*@
@(Html.Kendo().Grid(Model.Item2)
.Name("gridAdvertisementContent")
.Columns(c =>
{
    c.Bound(p => p.ID).Hidden();
    c.Bound(p => p.ContentURL).Title(AAS.Management.Resources.Names.AdvertisementContent_ContentURL);
    c.Bound(p => p.DeviceID).Title(AAS.Management.Resources.Names.Device);
    c.Bound(p => p.PlatformID).Title(AAS.Management.Resources.Names.Platform);
    c.Bound(p => p.State).Title(AAS.Management.Resources.Names.AdvertisementContent_State);
 })
 )}

I solved this by passing two models together:

@model Tuple< AAS.Management.Models.AdvertisementModel,IEnumerable< AAS.Management.Models.AdvertisementContentModel>>
@using (@Html.BeginForm()) { 
@*divs for first model*@
@(Html.Kendo().Grid(Model.Item2)
.Name("gridAdvertisementContent")
.Columns(c =>
{
    c.Bound(p => p.ID).Hidden();
    c.Bound(p => p.ContentURL).Title(AAS.Management.Resources.Names.AdvertisementContent_ContentURL);
    c.Bound(p => p.DeviceID).Title(AAS.Management.Resources.Names.Device);
    c.Bound(p => p.PlatformID).Title(AAS.Management.Resources.Names.Platform);
    c.Bound(p => p.State).Title(AAS.Management.Resources.Names.AdvertisementContent_State);
 })
 )}

相关问答

更多
  • 您需要在DDL中显示IEnumerable,请尝试以下示例(我尚未测试,可能存在某些类型错误) 定义你的模型,如, public class MyModel { public SchduleEnum SelectedCountry{ get; set; } public ProgramCatagory SelectedState{ get; set; } private IEnumerable stateList; private IEnumerable
  • 你需要做两件事才能使你的代码正常工作。 你需要返回一个列表(或者实际上任何支持IEnumerable接口的东西)。 您需要通过调用ToDataSourceResult来格式化返回数据。 于是 public ActionResult User_Read([DataSourceRequest]DataSourceRequest request) { var model = new List() { new ViewM ...
  • 侦听链接的click事件,并对执行删除功能的action方法进行ajax调用。 确保使用HttpPost属性修饰DeleteThis方法。 删除应始终是HttpPost操作。 不是GET行动。 [HttpPost] public ActionResult DeleteThis(string id) { try { // to do : delete return Json(new { Status="Deleted"}); } catch(Exception ex) { ...
  • 正如评论中所提到的,由于您没有将参数传递给服务器,因此500内部错误将失败。 为了从客户端发送参数,您有两种方法: - 1)可以像这样在Action方法中发送参数作为路由值: - read.Action("_AdvancedSearchResult", "ContactList", new { cont = 2 }) //Send param 2)您可以使用Data方法发送参数: - read.Action("_AdvancedSearchResult", "ContactList").Data("add ...
  • 我把两个模型放在一起解决了这个问题: @model Tuple< AAS.Management.Models.AdvertisementModel,IEnumerable< AAS.Management.Models.AdvertisementContentModel>> @using (@Html.BeginForm()) { @*divs for first model*@ @(Html.Kendo().Grid(Model.Item2) .Name("gridAdvertisementContent ...
  • 以下是@Stephen Muecke精彩解决方案的工作和更新代码。 ı希望这对那些寻找这种解决方案或方法的人也有用。 非常感谢@Stephen Muecke再次提供他的帮助和聪明的解决方案:)请注意,为简洁起见,所有不必要的代码都被删除了。 视图: @using (Html.BeginForm("CreateComment", "Issue", FormMethod.Post, new { id = "frmDetails" })) {
    @f ...
  • 将类型添加到脚本标记